From 14596c5499c3c1c4cd0a591032045a8d9ab27d4f Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Fri, 14 Nov 2025 13:33:27 +0000 Subject: [PATCH] Add Kiota client. --- Marechai.App/App.xaml.cs | 164 +- Marechai.App/Services/Client/ApiClient.cs | 318 ++++ .../Client/Auth/AuthRequestBuilder.cs | 41 + .../Client/Auth/Login/LoginRequestBuilder.cs | 98 + .../Client/Books/BooksRequestBuilder.cs | 181 ++ .../Companies/CompaniesRequestBuilder.cs | 124 ++ .../Item/CompaniesItemRequestBuilder.cs | 95 + .../Books/Item/BookItemRequestBuilder.cs | 228 +++ .../Item/Companies/CompaniesRequestBuilder.cs | 92 + .../MachineFamiliesRequestBuilder.cs | 92 + .../Item/Machines/MachinesRequestBuilder.cs | 92 + .../Books/Item/People/PeopleRequestBuilder.cs | 92 + .../Books/Item/Scans/ScansRequestBuilder.cs | 92 + .../Item/Synopsis/SynopsisRequestBuilder.cs | 91 + .../Scans/Item/ScansItemRequestBuilder.cs | 192 ++ .../Client/Books/Scans/ScansRequestBuilder.cs | 124 ++ .../BrowserTestsRequestBuilder.cs | 92 + .../Client/ByLetter/ByLetterRequestBuilder.cs | 48 + .../ByLetter/Item/WithCItemRequestBuilder.cs | 92 + .../Client/ByYear/ByYearRequestBuilder.cs | 61 + .../ByYear/Item/WithYearItemRequestBuilder.cs | 92 + .../Companies/CompaniesRequestBuilder.cs | 181 ++ .../Item/CompanyItemRequestBuilder.cs | 216 +++ .../Description/DescriptionRequestBuilder.cs | 148 ++ .../Description/Text/TextRequestBuilder.cs | 91 + .../Item/Logos/LogosRequestBuilder.cs | 92 + .../Item/Machines/MachinesRequestBuilder.cs | 92 + .../Item/Soldto/SoldtoRequestBuilder.cs | 91 + .../Letter/Item/LetterItemRequestBuilder.cs | 92 + .../Companies/Letter/LetterRequestBuilder.cs | 48 + .../ChangeYear/ChangeYearRequestBuilder.cs | 61 + .../Item/ChangeYearItemRequestBuilder.cs | 175 ++ .../Item/ChangeYearPutRequestBodyMember1.cs | 55 + .../Item/ChangeYearPutRequestBodyMember2.cs | 55 + .../Logos/Item/LogosItemRequestBuilder.cs | 95 + .../Companies/Logos/LogosRequestBuilder.cs | 130 ++ .../Computers/ComputersRequestBuilder.cs | 92 + .../Client/Consoles/ConsolesRequestBuilder.cs | 92 + .../Client/Count/CountRequestBuilder.cs | 91 + .../Countries/CountriesRequestBuilder.cs | 61 + .../Item/Companies/CompaniesRequestBuilder.cs | 92 + .../Item/CountriesItemRequestBuilder.cs | 47 + .../Countries/Item/Name/NameRequestBuilder.cs | 91 + .../Currencies/CurrenciesRequestBuilder.cs | 47 + .../Inflation/InflationRequestBuilder.cs | 169 ++ .../Item/InflationItemRequestBuilder.cs | 192 ++ .../Pegging/Item/PeggingItemRequestBuilder.cs | 192 ++ .../Pegging/PeggingRequestBuilder.cs | 169 ++ .../Companies/CompaniesRequestBuilder.cs | 169 ++ .../Item/CompaniesItemRequestBuilder.cs | 192 ++ .../Documents/DocumentsRequestBuilder.cs | 193 ++ .../Item/Companies/CompaniesRequestBuilder.cs | 92 + .../Item/DocumentItemRequestBuilder.cs | 228 +++ .../MachineFamiliesRequestBuilder.cs | 92 + .../Item/Machines/MachinesRequestBuilder.cs | 92 + .../Item/People/PeopleRequestBuilder.cs | 92 + .../Item/Scans/ScansRequestBuilder.cs | 92 + .../Item/Synopsis/SynopsisRequestBuilder.cs | 91 + .../People/Item/PeopleItemRequestBuilder.cs | 192 ++ .../Documents/People/PeopleRequestBuilder.cs | 169 ++ .../Roles/Enabled/EnabledRequestBuilder.cs | 92 + .../Roles/Item/RolesItemRequestBuilder.cs | 91 + .../Documents/Roles/RolesRequestBuilder.cs | 111 ++ .../Scans/Item/ScansItemRequestBuilder.cs | 192 ++ .../Documents/Scans/ScansRequestBuilder.cs | 124 ++ .../Client/Dumps/DumpsRequestBuilder.cs | 156 ++ .../Dumps/Item/DumpsItemRequestBuilder.cs | 192 ++ .../Client/Gpus/GpusRequestBuilder.cs | 169 ++ .../Gpus/Item/GpusItemRequestBuilder.cs | 192 ++ .../InstructionSetExtensionsRequestBuilder.cs | 175 ++ ...tructionSetExtensionsItemRequestBuilder.cs | 192 ++ .../Item/WithExtensionItemRequestBuilder.cs | 91 + .../VerifyUniqueRequestBuilder.cs | 48 + ...nSetExtensionsByProcessorRequestBuilder.cs | 124 ++ ...ExtensionsByProcessorItemRequestBuilder.cs | 95 + .../InstructionSetsRequestBuilder.cs | 175 ++ .../Item/InstructionSetsItemRequestBuilder.cs | 192 ++ .../Item/WithNameItemRequestBuilder.cs | 91 + .../VerifyUniqueRequestBuilder.cs | 48 + .../Iso31661NumericRequestBuilder.cs | 92 + .../Client/Iso4217/Iso4217RequestBuilder.cs | 92 + .../Item/LicensesItemRequestBuilder.cs | 192 ++ .../Client/Licenses/LicensesRequestBuilder.cs | 169 ++ .../Books/BooksRequestBuilder.cs | 124 ++ .../Books/Item/BooksItemRequestBuilder.cs | 95 + .../Documents/DocumentsRequestBuilder.cs | 124 ++ .../Item/DocumentsItemRequestBuilder.cs | 93 + .../Item/MachineFamiliesItemRequestBuilder.cs | 192 ++ .../MachineFamiliesRequestBuilder.cs | 181 ++ .../Machines/Books/BooksRequestBuilder.cs | 124 ++ .../Books/Item/BooksItemRequestBuilder.cs | 95 + .../Documents/DocumentsRequestBuilder.cs | 124 ++ .../Item/DocumentsItemRequestBuilder.cs | 95 + .../Gpus/ByMachine/ByMachineRequestBuilder.cs | 61 + .../Item/WithMachineItemRequestBuilder.cs | 92 + .../Machines/Gpus/GpusRequestBuilder.cs | 130 ++ .../Gpus/Item/GpusItemRequestBuilder.cs | 95 + .../Machines/Item/Full/FullRequestBuilder.cs | 91 + .../Machines/Item/Gpus/GpusRequestBuilder.cs | 92 + .../Machines/Item/ItemRequestBuilder.cs | 240 +++ .../Item/Memories/MemoriesRequestBuilder.cs | 92 + .../Item/Photos/PhotosRequestBuilder.cs | 92 + .../Processors/ProcessorsRequestBuilder.cs | 92 + .../Item/Screens/ScreensRequestBuilder.cs | 92 + .../SoundSynths/SoundSynthsRequestBuilder.cs | 92 + .../Item/Storage/StorageRequestBuilder.cs | 92 + .../Client/Machines/MachinesRequestBuilder.cs | 193 ++ .../Photos/Item/PhotosItemRequestBuilder.cs | 144 ++ .../Machines/Photos/PhotosRequestBuilder.cs | 124 ++ .../Companies/CompaniesRequestBuilder.cs | 124 ++ .../Item/CompaniesItemRequestBuilder.cs | 95 + .../Magazines/Issues/IssuesRequestBuilder.cs | 169 ++ .../Issues/Item/IssuesItemRequestBuilder.cs | 192 ++ .../Item/Companies/CompaniesRequestBuilder.cs | 92 + .../Magazines/Item/ItemRequestBuilder.cs | 228 +++ .../MachineFamiliesRequestBuilder.cs | 92 + .../Item/Machines/MachinesRequestBuilder.cs | 92 + .../Item/People/PeopleRequestBuilder.cs | 92 + .../Item/Scans/ScansRequestBuilder.cs | 92 + .../Item/Synopsis/SynopsisRequestBuilder.cs | 91 + .../Magazines/MagazinesRequestBuilder.cs | 193 ++ .../Scans/Item/ScansItemRequestBuilder.cs | 192 ++ .../Magazines/Scans/ScansRequestBuilder.cs | 124 ++ .../Magazines/Titles/TitlesRequestBuilder.cs | 92 + .../MagazinesByMachineItemRequestBuilder.cs | 95 + .../MagazinesByMachineRequestBuilder.cs | 124 ++ ...azinesByMachineFamilyItemRequestBuilder.cs | 95 + .../MagazinesByMachineFamilyRequestBuilder.cs | 124 ++ .../MaximumYear/MaximumYearRequestBuilder.cs | 91 + .../Medias/Item/MediasItemRequestBuilder.cs | 192 ++ .../Client/Medias/MediasRequestBuilder.cs | 162 ++ .../Medias/Titles/TitlesRequestBuilder.cs | 92 + .../MemoriesByMachineItemRequestBuilder.cs | 95 + .../MemoriesByMachineRequestBuilder.cs | 124 ++ .../MinimumYear/MinimumYearRequestBuilder.cs | 91 + .../Services/Client/Models/AuthRequest.cs | 75 + .../Services/Client/Models/AuthResponse.cs | 79 + .../Client/Models/BookByMachineDto.cs | 105 ++ .../Client/Models/BookByMachineFamilyDto.cs | 105 ++ .../Services/Client/Models/BookDto.cs | 169 ++ .../Services/Client/Models/BookScanDto.cs | 371 ++++ .../Models/BookScanDto_colorspaceMember1.cs | 55 + .../BookScanDto_resolution_unitMember1.cs | 55 + .../Services/Client/Models/BrowserTest.cs | 167 ++ .../Services/Client/Models/ColorSpace.cs | 55 + .../Client/Models/CompanyByBookDto.cs | 115 ++ .../Client/Models/CompanyByDocumentDto.cs | 115 ++ .../Client/Models/CompanyByMagazineDto.cs | 115 ++ .../Models/CompanyBySoftwareFamilyDto.cs | 115 ++ .../Models/CompanyBySoftwareVariantDto.cs | 115 ++ .../Models/CompanyBySoftwareVersionDto.cs | 115 ++ .../Client/Models/CompanyDescriptionDto.cs | 95 + .../Services/Client/Models/CompanyDto.cs | 227 +++ .../Services/Client/Models/CompanyLogoDto.cs | 89 + .../Services/Client/Models/Contrast.cs | 55 + .../Client/Models/CurrencyInflationDto.cs | 105 ++ .../Client/Models/CurrencyPeggingDto.cs | 123 ++ .../Client/Models/DocumentByMachineDto.cs | 105 ++ .../Models/DocumentByMachineFamilyDto.cs | 105 ++ .../Client/Models/DocumentCompanyDto.cs | 95 + .../Services/Client/Models/DocumentDto.cs | 119 ++ .../Client/Models/DocumentPersonDto.cs | 125 ++ .../Services/Client/Models/DocumentRoleDto.cs | 79 + .../Services/Client/Models/DocumentScanDto.cs | 371 ++++ .../DocumentScanDto_colorspaceMember1.cs | 55 + .../DocumentScanDto_resolution_unitMember1.cs | 55 + .../Services/Client/Models/DumpDto.cs | 139 ++ .../Services/Client/Models/ExposureMode.cs | 55 + .../Services/Client/Models/ExposureProgram.cs | 55 + Marechai.App/Services/Client/Models/Flash.cs | 55 + .../Services/Client/Models/GpuByMachineDto.cs | 105 ++ Marechai.App/Services/Client/Models/GpuDto.cs | 159 ++ .../Client/Models/InstructionSetDto.cs | 75 + .../InstructionSetExtensionByProcessorDto.cs | 105 ++ .../Models/InstructionSetExtensionDto.cs | 75 + .../Client/Models/Iso31661NumericDto.cs | 75 + .../Services/Client/Models/Iso4217Dto.cs | 99 ++ .../Services/Client/Models/LicenseDto.cs | 113 ++ .../Services/Client/Models/LightSource.cs | 55 + .../Services/Client/Models/MachineDto.cs | 147 ++ .../Client/Models/MachineFamilyDto.cs | 95 + .../Services/Client/Models/MachinePhotoDto.cs | 1582 +++++++++++++++++ .../MachinePhotoDto_colorspaceMember1.cs | 55 + .../Models/MachinePhotoDto_contrastMember1.cs | 55 + .../MachinePhotoDto_exposure_methodMember1.cs | 55 + ...MachinePhotoDto_exposure_programMember1.cs | 55 + .../Models/MachinePhotoDto_flashMember1.cs | 55 + .../MachinePhotoDto_light_sourceMember1.cs | 55 + .../MachinePhotoDto_metering_modeMember1.cs | 55 + .../MachinePhotoDto_orientationMember1.cs | 55 + .../MachinePhotoDto_resolution_unitMember1.cs | 55 + .../MachinePhotoDto_saturationMember1.cs | 55 + ...chinePhotoDto_scene_capture_typeMember1.cs | 55 + .../MachinePhotoDto_sensing_methodMember1.cs | 55 + .../MachinePhotoDto_sharpnessMember1.cs | 55 + ...ePhotoDto_subject_distance_rangeMember1.cs | 55 + .../MachinePhotoDto_white_balanceMember1.cs | 55 + .../Client/Models/MagazineByMachineDto.cs | 105 ++ .../Models/MagazineByMachineFamilyDto.cs | 105 ++ .../Services/Client/Models/MagazineDto.cs | 133 ++ .../Client/Models/MagazineIssueDto.cs | 139 ++ .../Services/Client/Models/MagazineScanDto.cs | 371 ++++ .../MagazineScanDto_colorspaceMember1.cs | 55 + .../MagazineScanDto_resolution_unitMember1.cs | 55 + .../Services/Client/Models/MediaDto.cs | 384 ++++ .../MediaDto_storage_interfaceMember1.cs | 55 + .../Client/Models/MemoryByMachineDto.cs | 103 ++ .../Services/Client/Models/MeteringMode.cs | 55 + .../Services/Client/Models/NewsDto.cs | 113 ++ .../Client/Models/OpticalDiscTrack.cs | 99 ++ .../Services/Client/Models/Orientation.cs | 55 + .../Services/Client/Models/PersonByBookDto.cs | 145 ++ .../Client/Models/PersonByDocumentDto.cs | 145 ++ .../Client/Models/PersonByMagazineDto.cs | 145 ++ .../Services/Client/Models/PersonDto.cs | 167 ++ .../Services/Client/Models/ProblemDetails.cs | 108 ++ .../Client/Models/ProcessorByMachineDto.cs | 115 ++ .../Services/Client/Models/ProcessorDto.cs | 339 ++++ .../Client/Models/ResolutionByGpuDto.cs | 170 ++ .../ResolutionByGpuDto_resolutionMember1.cs | 55 + .../Client/Models/ResolutionByScreenDto.cs | 170 ++ ...ResolutionByScreenDto_resolutionMember1.cs | 55 + .../Services/Client/Models/ResolutionDto.cs | 113 ++ .../Services/Client/Models/ResolutionUnit.cs | 55 + .../Services/Client/Models/Saturation.cs | 55 + .../Client/Models/SceneCaptureType.cs | 55 + .../Client/Models/ScreenByMachineDto.cs | 170 ++ .../ScreenByMachineDto_screenMember1.cs | 55 + .../Services/Client/Models/ScreenDto.cs | 220 +++ .../ScreenDto_native_resolutionMember1.cs | 55 + .../Services/Client/Models/SensingMethod.cs | 55 + .../Services/Client/Models/Sharpness.cs | 55 + .../Client/Models/SoftwareFamilyDto.cs | 99 ++ .../Client/Models/SoftwareVariantDto.cs | 213 +++ .../Client/Models/SoftwareVersionDto.cs | 159 ++ .../Client/Models/SoundSynthByMachineDto.cs | 105 ++ .../Services/Client/Models/SoundSynthDto.cs | 169 ++ .../Client/Models/StorageByMachineDto.cs | 93 + .../Client/Models/StorageInterface.cs | 55 + .../Client/Models/SubjectDistanceRange.cs | 55 + .../Client/Models/VariableBlockSize.cs | 85 + .../Services/Client/Models/WhiteBalance.cs | 55 + .../News/Latest/LatestRequestBuilder.cs | 92 + .../Client/News/NewsRequestBuilder.cs | 161 ++ .../People/Item/PeopleItemRequestBuilder.cs | 192 ++ .../Client/People/PeopleRequestBuilder.cs | 169 ++ .../Item/PeopleByBookItemRequestBuilder.cs | 95 + .../PeopleByBookRequestBuilder.cs | 124 ++ .../PeopleByDocumentItemRequestBuilder.cs | 95 + .../PeopleByDocumentRequestBuilder.cs | 124 ++ .../PeopleByMagazineItemRequestBuilder.cs | 95 + .../PeopleByMagazineRequestBuilder.cs | 124 ++ .../InstructionSetExtensionsRequestBuilder.cs | 92 + .../Item/WithProcessorItemRequestBuilder.cs | 41 + .../Processor/ProcessorRequestBuilder.cs | 61 + .../Item/ProcessorsItemRequestBuilder.cs | 192 ++ .../Processors/ProcessorsRequestBuilder.cs | 169 ++ .../ByMachine/ByMachineRequestBuilder.cs | 61 + .../Item/WithMachineItemRequestBuilder.cs | 92 + .../ProcessorsByMachineItemRequestBuilder.cs | 95 + .../ProcessorsByMachineRequestBuilder.cs | 130 ++ .../Item/ResolutionsItemRequestBuilder.cs | 192 ++ .../Resolutions/ResolutionsRequestBuilder.cs | 169 ++ .../Gpus/GpusRequestBuilder.cs | 61 + .../Resolutions/ResolutionsRequestBuilder.cs | 92 + .../Item/WithResolutionItemRequestBuilder.cs | 41 + .../ResolutionsByGpuItemRequestBuilder.cs | 95 + .../ResolutionsByGpuRequestBuilder.cs | 130 ++ .../ResolutionsByScreenItemRequestBuilder.cs | 95 + .../ResolutionsByScreenRequestBuilder.cs | 124 ++ .../Client/Screens/Item/ItemRequestBuilder.cs | 198 +++ .../Resolutions/ResolutionsRequestBuilder.cs | 92 + .../Client/Screens/ScreensRequestBuilder.cs | 169 ++ .../ScreensByMachineItemRequestBuilder.cs | 95 + .../ScreensByMachineRequestBuilder.cs | 124 ++ .../Companies/CompaniesRequestBuilder.cs | 111 ++ .../Item/CompaniesItemRequestBuilder.cs | 95 + .../Families/FamiliesRequestBuilder.cs | 162 ++ .../Item/Companies/CompaniesRequestBuilder.cs | 92 + .../Families/Item/ItemRequestBuilder.cs | 198 +++ .../Client/Software/SoftwareRequestBuilder.cs | 53 + .../Companies/CompaniesRequestBuilder.cs | 111 ++ .../Item/CompaniesItemRequestBuilder.cs | 95 + .../Item/Companies/CompaniesRequestBuilder.cs | 92 + .../Variants/Item/ItemRequestBuilder.cs | 198 +++ .../Variants/VariantsRequestBuilder.cs | 162 ++ .../Companies/CompaniesRequestBuilder.cs | 111 ++ .../Item/CompaniesItemRequestBuilder.cs | 95 + .../Item/Companies/CompaniesRequestBuilder.cs | 92 + .../Versions/Item/ItemRequestBuilder.cs | 198 +++ .../Versions/VersionsRequestBuilder.cs | 162 ++ .../Item/SoundSynthsItemRequestBuilder.cs | 192 ++ .../SoundSynths/SoundSynthsRequestBuilder.cs | 169 ++ .../ByMachine/ByMachineRequestBuilder.cs | 61 + .../Item/WithMachineItemRequestBuilder.cs | 92 + .../SoundSynthsByMachineItemRequestBuilder.cs | 95 + .../SoundSynthsByMachineRequestBuilder.cs | 130 ++ .../StorageByMachineItemRequestBuilder.cs | 95 + .../StorageByMachineRequestBuilder.cs | 124 ++ Marechai.App/Services/Client/kiota-lock.json | 34 + .../CompositeSerializationWriterFactory.cs | 43 + .../Services/ServiceCollectionExtensions.cs | 123 ++ 302 files changed, 36504 insertions(+), 75 deletions(-) create mode 100644 Marechai.App/Services/Client/ApiClient.cs create mode 100644 Marechai.App/Services/Client/Auth/AuthRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Auth/Login/LoginRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Books/BooksRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Books/Companies/CompaniesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Books/Companies/Item/CompaniesItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Books/Item/BookItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Books/Item/Companies/CompaniesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Books/Item/MachineFamilies/MachineFamiliesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Books/Item/Machines/MachinesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Books/Item/People/PeopleRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Books/Item/Scans/ScansRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Books/Item/Synopsis/SynopsisRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Books/Scans/Item/ScansItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Books/Scans/ScansRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/BrowserTests/BrowserTestsRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/ByLetter/ByLetterRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/ByLetter/Item/WithCItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/ByYear/ByYearRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/ByYear/Item/WithYearItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Companies/CompaniesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Companies/Item/CompanyItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Companies/Item/Description/DescriptionRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Companies/Item/Description/Text/TextRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Companies/Item/Logos/LogosRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Companies/Item/Machines/MachinesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Companies/Item/Soldto/SoldtoRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Companies/Letter/Item/LetterItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Companies/Letter/LetterRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Companies/Logos/ChangeYear/ChangeYearRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Companies/Logos/ChangeYear/Item/ChangeYearItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Companies/Logos/ChangeYear/Item/ChangeYearPutRequestBodyMember1.cs create mode 100644 Marechai.App/Services/Client/Companies/Logos/ChangeYear/Item/ChangeYearPutRequestBodyMember2.cs create mode 100644 Marechai.App/Services/Client/Companies/Logos/Item/LogosItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Companies/Logos/LogosRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Computers/ComputersRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Consoles/ConsolesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Count/CountRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Countries/CountriesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Countries/Item/Companies/CompaniesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Countries/Item/CountriesItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Countries/Item/Name/NameRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Currencies/CurrenciesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Currencies/Inflation/InflationRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Currencies/Inflation/Item/InflationItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Currencies/Pegging/Item/PeggingItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Currencies/Pegging/PeggingRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Documents/Companies/CompaniesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Documents/Companies/Item/CompaniesItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Documents/DocumentsRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Documents/Item/Companies/CompaniesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Documents/Item/DocumentItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Documents/Item/MachineFamilies/MachineFamiliesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Documents/Item/Machines/MachinesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Documents/Item/People/PeopleRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Documents/Item/Scans/ScansRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Documents/Item/Synopsis/SynopsisRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Documents/People/Item/PeopleItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Documents/People/PeopleRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Documents/Roles/Enabled/EnabledRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Documents/Roles/Item/RolesItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Documents/Roles/RolesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Documents/Scans/Item/ScansItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Documents/Scans/ScansRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Dumps/DumpsRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Dumps/Item/DumpsItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Gpus/GpusRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Gpus/Item/GpusItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/InstructionSetExtensions/InstructionSetExtensionsRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/InstructionSetExtensions/Item/InstructionSetExtensionsItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/InstructionSetExtensions/VerifyUnique/Item/WithExtensionItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/InstructionSetExtensions/VerifyUnique/VerifyUniqueRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/InstructionSetExtensionsByProcessor/InstructionSetExtensionsByProcessorRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/InstructionSetExtensionsByProcessor/Item/InstructionSetExtensionsByProcessorItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/InstructionSets/InstructionSetsRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/InstructionSets/Item/InstructionSetsItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/InstructionSets/VerifyUnique/Item/WithNameItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/InstructionSets/VerifyUnique/VerifyUniqueRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Iso31661Numeric/Iso31661NumericRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Iso4217/Iso4217RequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Licenses/Item/LicensesItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Licenses/LicensesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/MachineFamilies/Books/BooksRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/MachineFamilies/Books/Item/BooksItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/MachineFamilies/Documents/DocumentsRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/MachineFamilies/Documents/Item/DocumentsItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/MachineFamilies/Item/MachineFamiliesItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/MachineFamilies/MachineFamiliesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Machines/Books/BooksRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Machines/Books/Item/BooksItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Machines/Documents/DocumentsRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Machines/Documents/Item/DocumentsItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Machines/Gpus/ByMachine/ByMachineRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Machines/Gpus/ByMachine/Item/WithMachineItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Machines/Gpus/GpusRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Machines/Gpus/Item/GpusItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Machines/Item/Full/FullRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Machines/Item/Gpus/GpusRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Machines/Item/ItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Machines/Item/Memories/MemoriesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Machines/Item/Photos/PhotosRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Machines/Item/Processors/ProcessorsRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Machines/Item/Screens/ScreensRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Machines/Item/SoundSynths/SoundSynthsRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Machines/Item/Storage/StorageRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Machines/MachinesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Machines/Photos/Item/PhotosItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Machines/Photos/PhotosRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Magazines/Companies/CompaniesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Magazines/Companies/Item/CompaniesItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Magazines/Issues/IssuesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Magazines/Issues/Item/IssuesItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Magazines/Item/Companies/CompaniesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Magazines/Item/ItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Magazines/Item/MachineFamilies/MachineFamiliesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Magazines/Item/Machines/MachinesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Magazines/Item/People/PeopleRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Magazines/Item/Scans/ScansRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Magazines/Item/Synopsis/SynopsisRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Magazines/MagazinesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Magazines/Scans/Item/ScansItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Magazines/Scans/ScansRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Magazines/Titles/TitlesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/MagazinesByMachine/Item/MagazinesByMachineItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/MagazinesByMachine/MagazinesByMachineRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/MagazinesByMachineFamily/Item/MagazinesByMachineFamilyItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/MagazinesByMachineFamily/MagazinesByMachineFamilyRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/MaximumYear/MaximumYearRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Medias/Item/MediasItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Medias/MediasRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Medias/Titles/TitlesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/MemoriesByMachine/Item/MemoriesByMachineItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/MemoriesByMachine/MemoriesByMachineRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/MinimumYear/MinimumYearRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Models/AuthRequest.cs create mode 100644 Marechai.App/Services/Client/Models/AuthResponse.cs create mode 100644 Marechai.App/Services/Client/Models/BookByMachineDto.cs create mode 100644 Marechai.App/Services/Client/Models/BookByMachineFamilyDto.cs create mode 100644 Marechai.App/Services/Client/Models/BookDto.cs create mode 100644 Marechai.App/Services/Client/Models/BookScanDto.cs create mode 100644 Marechai.App/Services/Client/Models/BookScanDto_colorspaceMember1.cs create mode 100644 Marechai.App/Services/Client/Models/BookScanDto_resolution_unitMember1.cs create mode 100644 Marechai.App/Services/Client/Models/BrowserTest.cs create mode 100644 Marechai.App/Services/Client/Models/ColorSpace.cs create mode 100644 Marechai.App/Services/Client/Models/CompanyByBookDto.cs create mode 100644 Marechai.App/Services/Client/Models/CompanyByDocumentDto.cs create mode 100644 Marechai.App/Services/Client/Models/CompanyByMagazineDto.cs create mode 100644 Marechai.App/Services/Client/Models/CompanyBySoftwareFamilyDto.cs create mode 100644 Marechai.App/Services/Client/Models/CompanyBySoftwareVariantDto.cs create mode 100644 Marechai.App/Services/Client/Models/CompanyBySoftwareVersionDto.cs create mode 100644 Marechai.App/Services/Client/Models/CompanyDescriptionDto.cs create mode 100644 Marechai.App/Services/Client/Models/CompanyDto.cs create mode 100644 Marechai.App/Services/Client/Models/CompanyLogoDto.cs create mode 100644 Marechai.App/Services/Client/Models/Contrast.cs create mode 100644 Marechai.App/Services/Client/Models/CurrencyInflationDto.cs create mode 100644 Marechai.App/Services/Client/Models/CurrencyPeggingDto.cs create mode 100644 Marechai.App/Services/Client/Models/DocumentByMachineDto.cs create mode 100644 Marechai.App/Services/Client/Models/DocumentByMachineFamilyDto.cs create mode 100644 Marechai.App/Services/Client/Models/DocumentCompanyDto.cs create mode 100644 Marechai.App/Services/Client/Models/DocumentDto.cs create mode 100644 Marechai.App/Services/Client/Models/DocumentPersonDto.cs create mode 100644 Marechai.App/Services/Client/Models/DocumentRoleDto.cs create mode 100644 Marechai.App/Services/Client/Models/DocumentScanDto.cs create mode 100644 Marechai.App/Services/Client/Models/DocumentScanDto_colorspaceMember1.cs create mode 100644 Marechai.App/Services/Client/Models/DocumentScanDto_resolution_unitMember1.cs create mode 100644 Marechai.App/Services/Client/Models/DumpDto.cs create mode 100644 Marechai.App/Services/Client/Models/ExposureMode.cs create mode 100644 Marechai.App/Services/Client/Models/ExposureProgram.cs create mode 100644 Marechai.App/Services/Client/Models/Flash.cs create mode 100644 Marechai.App/Services/Client/Models/GpuByMachineDto.cs create mode 100644 Marechai.App/Services/Client/Models/GpuDto.cs create mode 100644 Marechai.App/Services/Client/Models/InstructionSetDto.cs create mode 100644 Marechai.App/Services/Client/Models/InstructionSetExtensionByProcessorDto.cs create mode 100644 Marechai.App/Services/Client/Models/InstructionSetExtensionDto.cs create mode 100644 Marechai.App/Services/Client/Models/Iso31661NumericDto.cs create mode 100644 Marechai.App/Services/Client/Models/Iso4217Dto.cs create mode 100644 Marechai.App/Services/Client/Models/LicenseDto.cs create mode 100644 Marechai.App/Services/Client/Models/LightSource.cs create mode 100644 Marechai.App/Services/Client/Models/MachineDto.cs create mode 100644 Marechai.App/Services/Client/Models/MachineFamilyDto.cs create mode 100644 Marechai.App/Services/Client/Models/MachinePhotoDto.cs create mode 100644 Marechai.App/Services/Client/Models/MachinePhotoDto_colorspaceMember1.cs create mode 100644 Marechai.App/Services/Client/Models/MachinePhotoDto_contrastMember1.cs create mode 100644 Marechai.App/Services/Client/Models/MachinePhotoDto_exposure_methodMember1.cs create mode 100644 Marechai.App/Services/Client/Models/MachinePhotoDto_exposure_programMember1.cs create mode 100644 Marechai.App/Services/Client/Models/MachinePhotoDto_flashMember1.cs create mode 100644 Marechai.App/Services/Client/Models/MachinePhotoDto_light_sourceMember1.cs create mode 100644 Marechai.App/Services/Client/Models/MachinePhotoDto_metering_modeMember1.cs create mode 100644 Marechai.App/Services/Client/Models/MachinePhotoDto_orientationMember1.cs create mode 100644 Marechai.App/Services/Client/Models/MachinePhotoDto_resolution_unitMember1.cs create mode 100644 Marechai.App/Services/Client/Models/MachinePhotoDto_saturationMember1.cs create mode 100644 Marechai.App/Services/Client/Models/MachinePhotoDto_scene_capture_typeMember1.cs create mode 100644 Marechai.App/Services/Client/Models/MachinePhotoDto_sensing_methodMember1.cs create mode 100644 Marechai.App/Services/Client/Models/MachinePhotoDto_sharpnessMember1.cs create mode 100644 Marechai.App/Services/Client/Models/MachinePhotoDto_subject_distance_rangeMember1.cs create mode 100644 Marechai.App/Services/Client/Models/MachinePhotoDto_white_balanceMember1.cs create mode 100644 Marechai.App/Services/Client/Models/MagazineByMachineDto.cs create mode 100644 Marechai.App/Services/Client/Models/MagazineByMachineFamilyDto.cs create mode 100644 Marechai.App/Services/Client/Models/MagazineDto.cs create mode 100644 Marechai.App/Services/Client/Models/MagazineIssueDto.cs create mode 100644 Marechai.App/Services/Client/Models/MagazineScanDto.cs create mode 100644 Marechai.App/Services/Client/Models/MagazineScanDto_colorspaceMember1.cs create mode 100644 Marechai.App/Services/Client/Models/MagazineScanDto_resolution_unitMember1.cs create mode 100644 Marechai.App/Services/Client/Models/MediaDto.cs create mode 100644 Marechai.App/Services/Client/Models/MediaDto_storage_interfaceMember1.cs create mode 100644 Marechai.App/Services/Client/Models/MemoryByMachineDto.cs create mode 100644 Marechai.App/Services/Client/Models/MeteringMode.cs create mode 100644 Marechai.App/Services/Client/Models/NewsDto.cs create mode 100644 Marechai.App/Services/Client/Models/OpticalDiscTrack.cs create mode 100644 Marechai.App/Services/Client/Models/Orientation.cs create mode 100644 Marechai.App/Services/Client/Models/PersonByBookDto.cs create mode 100644 Marechai.App/Services/Client/Models/PersonByDocumentDto.cs create mode 100644 Marechai.App/Services/Client/Models/PersonByMagazineDto.cs create mode 100644 Marechai.App/Services/Client/Models/PersonDto.cs create mode 100644 Marechai.App/Services/Client/Models/ProblemDetails.cs create mode 100644 Marechai.App/Services/Client/Models/ProcessorByMachineDto.cs create mode 100644 Marechai.App/Services/Client/Models/ProcessorDto.cs create mode 100644 Marechai.App/Services/Client/Models/ResolutionByGpuDto.cs create mode 100644 Marechai.App/Services/Client/Models/ResolutionByGpuDto_resolutionMember1.cs create mode 100644 Marechai.App/Services/Client/Models/ResolutionByScreenDto.cs create mode 100644 Marechai.App/Services/Client/Models/ResolutionByScreenDto_resolutionMember1.cs create mode 100644 Marechai.App/Services/Client/Models/ResolutionDto.cs create mode 100644 Marechai.App/Services/Client/Models/ResolutionUnit.cs create mode 100644 Marechai.App/Services/Client/Models/Saturation.cs create mode 100644 Marechai.App/Services/Client/Models/SceneCaptureType.cs create mode 100644 Marechai.App/Services/Client/Models/ScreenByMachineDto.cs create mode 100644 Marechai.App/Services/Client/Models/ScreenByMachineDto_screenMember1.cs create mode 100644 Marechai.App/Services/Client/Models/ScreenDto.cs create mode 100644 Marechai.App/Services/Client/Models/ScreenDto_native_resolutionMember1.cs create mode 100644 Marechai.App/Services/Client/Models/SensingMethod.cs create mode 100644 Marechai.App/Services/Client/Models/Sharpness.cs create mode 100644 Marechai.App/Services/Client/Models/SoftwareFamilyDto.cs create mode 100644 Marechai.App/Services/Client/Models/SoftwareVariantDto.cs create mode 100644 Marechai.App/Services/Client/Models/SoftwareVersionDto.cs create mode 100644 Marechai.App/Services/Client/Models/SoundSynthByMachineDto.cs create mode 100644 Marechai.App/Services/Client/Models/SoundSynthDto.cs create mode 100644 Marechai.App/Services/Client/Models/StorageByMachineDto.cs create mode 100644 Marechai.App/Services/Client/Models/StorageInterface.cs create mode 100644 Marechai.App/Services/Client/Models/SubjectDistanceRange.cs create mode 100644 Marechai.App/Services/Client/Models/VariableBlockSize.cs create mode 100644 Marechai.App/Services/Client/Models/WhiteBalance.cs create mode 100644 Marechai.App/Services/Client/News/Latest/LatestRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/News/NewsRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/People/Item/PeopleItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/People/PeopleRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/PeopleByBook/Item/PeopleByBookItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/PeopleByBook/PeopleByBookRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/PeopleByDocument/Item/PeopleByDocumentItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/PeopleByDocument/PeopleByDocumentRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/PeopleByMagazine/Item/PeopleByMagazineItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/PeopleByMagazine/PeopleByMagazineRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Processor/Item/InstructionSetExtensions/InstructionSetExtensionsRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Processor/Item/WithProcessorItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Processor/ProcessorRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Processors/Item/ProcessorsItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Processors/ProcessorsRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/ProcessorsByMachine/ByMachine/ByMachineRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/ProcessorsByMachine/ByMachine/Item/WithMachineItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/ProcessorsByMachine/Item/ProcessorsByMachineItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/ProcessorsByMachine/ProcessorsByMachineRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Resolutions/Item/ResolutionsItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Resolutions/ResolutionsRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/ResolutionsByGpu/Gpus/GpusRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/ResolutionsByGpu/Gpus/Item/Resolutions/ResolutionsRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/ResolutionsByGpu/Gpus/Item/WithResolutionItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/ResolutionsByGpu/Item/ResolutionsByGpuItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/ResolutionsByGpu/ResolutionsByGpuRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/ResolutionsByScreen/Item/ResolutionsByScreenItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/ResolutionsByScreen/ResolutionsByScreenRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Screens/Item/ItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Screens/Item/Resolutions/ResolutionsRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Screens/ScreensRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/ScreensByMachine/Item/ScreensByMachineItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/ScreensByMachine/ScreensByMachineRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Software/Families/Companies/CompaniesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Software/Families/Companies/Item/CompaniesItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Software/Families/FamiliesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Software/Families/Item/Companies/CompaniesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Software/Families/Item/ItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Software/SoftwareRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Software/Variants/Companies/CompaniesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Software/Variants/Companies/Item/CompaniesItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Software/Variants/Item/Companies/CompaniesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Software/Variants/Item/ItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Software/Variants/VariantsRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Software/Versions/Companies/CompaniesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Software/Versions/Companies/Item/CompaniesItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Software/Versions/Item/Companies/CompaniesRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Software/Versions/Item/ItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/Software/Versions/VersionsRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/SoundSynths/Item/SoundSynthsItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/SoundSynths/SoundSynthsRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/SoundSynthsByMachine/ByMachine/ByMachineRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/SoundSynthsByMachine/ByMachine/Item/WithMachineItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/SoundSynthsByMachine/Item/SoundSynthsByMachineItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/SoundSynthsByMachine/SoundSynthsByMachineRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/StorageByMachine/Item/StorageByMachineItemRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/StorageByMachine/StorageByMachineRequestBuilder.cs create mode 100644 Marechai.App/Services/Client/kiota-lock.json create mode 100644 Marechai.App/Services/CompositeSerializationWriterFactory.cs create mode 100644 Marechai.App/Services/ServiceCollectionExtensions.cs diff --git a/Marechai.App/App.xaml.cs b/Marechai.App/App.xaml.cs index 211a604e..34ed0be2 100644 --- a/Marechai.App/App.xaml.cs +++ b/Marechai.App/App.xaml.cs @@ -3,9 +3,9 @@ using Microsoft.UI.Xaml; using Uno.Extensions; using Uno.Extensions.Configuration; using Uno.Extensions.Hosting; +using Uno.Extensions.Http; using Uno.Extensions.Localization; using Uno.Extensions.Navigation; -using Uno.Resizetizer; using Uno.UI; namespace Marechai.App; @@ -13,76 +13,94 @@ namespace Marechai.App; public partial class App : Application { /// - /// Initializes the singleton application object. This is the first line of authored code - /// executed, and as such is the logical equivalent of main() or WinMain(). + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). /// public App() { - this.InitializeComponent(); + InitializeComponent(); } protected Window? MainWindow { get; private set; } - protected IHost? Host { get; private set; } + protected IHost? Host { get; private set; } - protected async override void OnLaunched(LaunchActivatedEventArgs args) + protected override async void OnLaunched(LaunchActivatedEventArgs args) { - var builder = this.CreateBuilder(args) - // Add navigation support for toolkit controls such as TabBar and NavigationView - .UseToolkitNavigation() - .Configure(host => host -#if DEBUG - // Switch to Development environment when running in DEBUG - .UseEnvironment(Environments.Development) -#endif - .UseLogging(configure: (context, logBuilder) => - { - // Configure log levels for different categories of logging - logBuilder - .SetMinimumLevel( - context.HostingEnvironment.IsDevelopment() ? LogLevel.Information : LogLevel.Warning) + IApplicationBuilder builder = this.CreateBuilder(args) - // Default filters for core Uno Platform namespaces - .CoreLogLevel(LogLevel.Warning); - - // Uno Platform namespace filter groups - // Uncomment individual methods to see more detailed logging - //// Generic Xaml events - //logBuilder.XamlLogLevel(LogLevel.Debug); - //// Layout specific messages - //logBuilder.XamlLayoutLogLevel(LogLevel.Debug); - //// Storage messages - //logBuilder.StorageLogLevel(LogLevel.Debug); - //// Binding related messages - //logBuilder.XamlBindingLogLevel(LogLevel.Debug); - //// Binder memory references tracking - //logBuilder.BinderMemoryReferenceLogLevel(LogLevel.Debug); - //// DevServer and HotReload related - //logBuilder.HotReloadCoreLogLevel(LogLevel.Information); - //// Debug JS interop - //logBuilder.WebAssemblyLogLevel(LogLevel.Debug); - }, enableUnoLogging: true) - .UseSerilog(consoleLoggingEnabled: true, fileLoggingEnabled: true) - .UseConfiguration(configure: configBuilder => - configBuilder - .EmbeddedSource() - .Section() - ) - // Enable localization (see appsettings.json for supported languages) - .UseLocalization() - .UseHttp((context, services) => - { + // Add navigation support for toolkit controls such as TabBar and NavigationView + .UseToolkitNavigation() + .Configure(host => host #if DEBUG - // DelegatingHandler will be automatically injected - services.AddTransient(); + + // Switch to Development environment when running in DEBUG + .UseEnvironment(Environments.Development) #endif - }) - .ConfigureServices((context, services) => - { - // TODO: Register your services - //services.AddSingleton(); - }) - .UseNavigation(RegisterRoutes) - ); + .UseLogging((context, logBuilder) => + { + // Configure log levels for different categories of logging + logBuilder + .SetMinimumLevel(context + .HostingEnvironment + .IsDevelopment() + ? LogLevel.Information + : LogLevel.Warning) + + // Default filters for core Uno Platform namespaces + .CoreLogLevel(LogLevel.Warning); + + // Uno Platform namespace filter groups + // Uncomment individual methods to see more detailed logging + //// Generic Xaml events + //logBuilder.XamlLogLevel(LogLevel.Debug); + //// Layout specific messages + //logBuilder.XamlLayoutLogLevel(LogLevel.Debug); + //// Storage messages + //logBuilder.StorageLogLevel(LogLevel.Debug); + //// Binding related messages + //logBuilder.XamlBindingLogLevel(LogLevel.Debug); + //// Binder memory references tracking + //logBuilder.BinderMemoryReferenceLogLevel(LogLevel.Debug); + //// DevServer and HotReload related + //logBuilder.HotReloadCoreLogLevel(LogLevel.Information); + //// Debug JS interop + //logBuilder.WebAssemblyLogLevel(LogLevel.Debug); + }, + true) + .UseSerilog(true, true) + .UseConfiguration(configure: configBuilder => + configBuilder.EmbeddedSource() + .Section()) + + // Enable localization (see appsettings.json for supported languages) + .UseLocalization() + .UseHttp((context, services) => + { +#if DEBUG + + // DelegatingHandler will be automatically injected + services + .AddTransient(); +#endif + services.AddKiotaClientV2(context, + new EndpointOptions + { + Url = context.Configuration + .GetSection("ApiClient:Url") + .Value ?? + + // Fallback to a default URL if not configured + "https://localhost:5023" + }); + }) + .ConfigureServices((context, services) => + { + // TODO: Register your services + //services.AddSingleton(); + }) + .UseNavigation(RegisterRoutes)); + MainWindow = builder.Window; #if DEBUG @@ -95,20 +113,16 @@ public partial class App : Application private static void RegisterRoutes(IViewRegistry views, IRouteRegistry routes) { - views.Register( - new ViewMap(ViewModel: typeof(ShellViewModel)), - new ViewMap(), - new DataViewMap() - ); + views.Register(new ViewMap(ViewModel: typeof(ShellViewModel)), + new ViewMap(), + new DataViewMap()); - routes.Register( - new RouteMap("", View: views.FindByViewModel(), - Nested: - [ - new("Main", View: views.FindByViewModel(), IsDefault: true), - new("Second", View: views.FindByViewModel()), - ] - ) - ); + routes.Register(new RouteMap("", + views.FindByViewModel(), + Nested: + [ + new RouteMap("Main", views.FindByViewModel(), true), + new RouteMap("Second", views.FindByViewModel()) + ])); } -} +} \ No newline at end of file diff --git a/Marechai.App/Services/Client/ApiClient.cs b/Marechai.App/Services/Client/ApiClient.cs new file mode 100644 index 00000000..3738fdec --- /dev/null +++ b/Marechai.App/Services/Client/ApiClient.cs @@ -0,0 +1,318 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Auth; +using Marechai.App.Books; +using Marechai.App.BrowserTests; +using Marechai.App.ByLetter; +using Marechai.App.ByYear; +using Marechai.App.Companies; +using Marechai.App.Computers; +using Marechai.App.Consoles; +using Marechai.App.Count; +using Marechai.App.Countries; +using Marechai.App.Currencies; +using Marechai.App.Documents; +using Marechai.App.Dumps; +using Marechai.App.Gpus; +using Marechai.App.InstructionSetExtensions; +using Marechai.App.InstructionSetExtensionsByProcessor; +using Marechai.App.InstructionSets; +using Marechai.App.Iso31661Numeric; +using Marechai.App.Iso4217; +using Marechai.App.Licenses; +using Marechai.App.MachineFamilies; +using Marechai.App.Machines; +using Marechai.App.Magazines; +using Marechai.App.MagazinesByMachine; +using Marechai.App.MagazinesByMachineFamily; +using Marechai.App.MaximumYear; +using Marechai.App.Medias; +using Marechai.App.MemoriesByMachine; +using Marechai.App.MinimumYear; +using Marechai.App.News; +using Marechai.App.People; +using Marechai.App.PeopleByBook; +using Marechai.App.PeopleByDocument; +using Marechai.App.PeopleByMagazine; +using Marechai.App.Processor; +using Marechai.App.Processors; +using Marechai.App.ProcessorsByMachine; +using Marechai.App.Resolutions; +using Marechai.App.ResolutionsByGpu; +using Marechai.App.ResolutionsByScreen; +using Marechai.App.Screens; +using Marechai.App.ScreensByMachine; +using Marechai.App.Software; +using Marechai.App.SoundSynths; +using Marechai.App.SoundSynthsByMachine; +using Marechai.App.StorageByMachine; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Serialization.Form; +using Microsoft.Kiota.Serialization.Json; +using Microsoft.Kiota.Serialization.Multipart; +using Microsoft.Kiota.Serialization.Text; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Marechai.App +{ + /// + /// The main entry point of the SDK, exposes the configuration and the fluent API. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ApiClient : BaseRequestBuilder + { + /// The auth property + public global::Marechai.App.Auth.AuthRequestBuilder Auth + { + get => new global::Marechai.App.Auth.AuthRequestBuilder(PathParameters, RequestAdapter); + } + /// The books property + public global::Marechai.App.Books.BooksRequestBuilder Books + { + get => new global::Marechai.App.Books.BooksRequestBuilder(PathParameters, RequestAdapter); + } + /// The browserTests property + public global::Marechai.App.BrowserTests.BrowserTestsRequestBuilder BrowserTests + { + get => new global::Marechai.App.BrowserTests.BrowserTestsRequestBuilder(PathParameters, RequestAdapter); + } + /// The byLetter property + public global::Marechai.App.ByLetter.ByLetterRequestBuilder ByLetter + { + get => new global::Marechai.App.ByLetter.ByLetterRequestBuilder(PathParameters, RequestAdapter); + } + /// The byYear property + public global::Marechai.App.ByYear.ByYearRequestBuilder ByYear + { + get => new global::Marechai.App.ByYear.ByYearRequestBuilder(PathParameters, RequestAdapter); + } + /// The companies property + public global::Marechai.App.Companies.CompaniesRequestBuilder Companies + { + get => new global::Marechai.App.Companies.CompaniesRequestBuilder(PathParameters, RequestAdapter); + } + /// The computers property + public global::Marechai.App.Computers.ComputersRequestBuilder Computers + { + get => new global::Marechai.App.Computers.ComputersRequestBuilder(PathParameters, RequestAdapter); + } + /// The consoles property + public global::Marechai.App.Consoles.ConsolesRequestBuilder Consoles + { + get => new global::Marechai.App.Consoles.ConsolesRequestBuilder(PathParameters, RequestAdapter); + } + /// The count property + public global::Marechai.App.Count.CountRequestBuilder Count + { + get => new global::Marechai.App.Count.CountRequestBuilder(PathParameters, RequestAdapter); + } + /// The countries property + public global::Marechai.App.Countries.CountriesRequestBuilder Countries + { + get => new global::Marechai.App.Countries.CountriesRequestBuilder(PathParameters, RequestAdapter); + } + /// The currencies property + public global::Marechai.App.Currencies.CurrenciesRequestBuilder Currencies + { + get => new global::Marechai.App.Currencies.CurrenciesRequestBuilder(PathParameters, RequestAdapter); + } + /// The documents property + public global::Marechai.App.Documents.DocumentsRequestBuilder Documents + { + get => new global::Marechai.App.Documents.DocumentsRequestBuilder(PathParameters, RequestAdapter); + } + /// The dumps property + public global::Marechai.App.Dumps.DumpsRequestBuilder Dumps + { + get => new global::Marechai.App.Dumps.DumpsRequestBuilder(PathParameters, RequestAdapter); + } + /// The gpus property + public global::Marechai.App.Gpus.GpusRequestBuilder Gpus + { + get => new global::Marechai.App.Gpus.GpusRequestBuilder(PathParameters, RequestAdapter); + } + /// The instructionSetExtensions property + public global::Marechai.App.InstructionSetExtensions.InstructionSetExtensionsRequestBuilder InstructionSetExtensions + { + get => new global::Marechai.App.InstructionSetExtensions.InstructionSetExtensionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The instructionSetExtensionsByProcessor property + public global::Marechai.App.InstructionSetExtensionsByProcessor.InstructionSetExtensionsByProcessorRequestBuilder InstructionSetExtensionsByProcessor + { + get => new global::Marechai.App.InstructionSetExtensionsByProcessor.InstructionSetExtensionsByProcessorRequestBuilder(PathParameters, RequestAdapter); + } + /// The instructionSets property + public global::Marechai.App.InstructionSets.InstructionSetsRequestBuilder InstructionSets + { + get => new global::Marechai.App.InstructionSets.InstructionSetsRequestBuilder(PathParameters, RequestAdapter); + } + /// The iso31661Numeric property + public global::Marechai.App.Iso31661Numeric.Iso31661NumericRequestBuilder Iso31661Numeric + { + get => new global::Marechai.App.Iso31661Numeric.Iso31661NumericRequestBuilder(PathParameters, RequestAdapter); + } + /// The iso4217 property + public global::Marechai.App.Iso4217.Iso4217RequestBuilder Iso4217 + { + get => new global::Marechai.App.Iso4217.Iso4217RequestBuilder(PathParameters, RequestAdapter); + } + /// The licenses property + public global::Marechai.App.Licenses.LicensesRequestBuilder Licenses + { + get => new global::Marechai.App.Licenses.LicensesRequestBuilder(PathParameters, RequestAdapter); + } + /// The machineFamilies property + public global::Marechai.App.MachineFamilies.MachineFamiliesRequestBuilder MachineFamilies + { + get => new global::Marechai.App.MachineFamilies.MachineFamiliesRequestBuilder(PathParameters, RequestAdapter); + } + /// The machines property + public global::Marechai.App.Machines.MachinesRequestBuilder Machines + { + get => new global::Marechai.App.Machines.MachinesRequestBuilder(PathParameters, RequestAdapter); + } + /// The magazines property + public global::Marechai.App.Magazines.MagazinesRequestBuilder Magazines + { + get => new global::Marechai.App.Magazines.MagazinesRequestBuilder(PathParameters, RequestAdapter); + } + /// The magazinesByMachine property + public global::Marechai.App.MagazinesByMachine.MagazinesByMachineRequestBuilder MagazinesByMachine + { + get => new global::Marechai.App.MagazinesByMachine.MagazinesByMachineRequestBuilder(PathParameters, RequestAdapter); + } + /// The magazinesByMachineFamily property + public global::Marechai.App.MagazinesByMachineFamily.MagazinesByMachineFamilyRequestBuilder MagazinesByMachineFamily + { + get => new global::Marechai.App.MagazinesByMachineFamily.MagazinesByMachineFamilyRequestBuilder(PathParameters, RequestAdapter); + } + /// The maximumYear property + public global::Marechai.App.MaximumYear.MaximumYearRequestBuilder MaximumYear + { + get => new global::Marechai.App.MaximumYear.MaximumYearRequestBuilder(PathParameters, RequestAdapter); + } + /// The medias property + public global::Marechai.App.Medias.MediasRequestBuilder Medias + { + get => new global::Marechai.App.Medias.MediasRequestBuilder(PathParameters, RequestAdapter); + } + /// The memoriesByMachine property + public global::Marechai.App.MemoriesByMachine.MemoriesByMachineRequestBuilder MemoriesByMachine + { + get => new global::Marechai.App.MemoriesByMachine.MemoriesByMachineRequestBuilder(PathParameters, RequestAdapter); + } + /// The minimumYear property + public global::Marechai.App.MinimumYear.MinimumYearRequestBuilder MinimumYear + { + get => new global::Marechai.App.MinimumYear.MinimumYearRequestBuilder(PathParameters, RequestAdapter); + } + /// The news property + public global::Marechai.App.News.NewsRequestBuilder News + { + get => new global::Marechai.App.News.NewsRequestBuilder(PathParameters, RequestAdapter); + } + /// The people property + public global::Marechai.App.People.PeopleRequestBuilder People + { + get => new global::Marechai.App.People.PeopleRequestBuilder(PathParameters, RequestAdapter); + } + /// The peopleByBook property + public global::Marechai.App.PeopleByBook.PeopleByBookRequestBuilder PeopleByBook + { + get => new global::Marechai.App.PeopleByBook.PeopleByBookRequestBuilder(PathParameters, RequestAdapter); + } + /// The peopleByDocument property + public global::Marechai.App.PeopleByDocument.PeopleByDocumentRequestBuilder PeopleByDocument + { + get => new global::Marechai.App.PeopleByDocument.PeopleByDocumentRequestBuilder(PathParameters, RequestAdapter); + } + /// The peopleByMagazine property + public global::Marechai.App.PeopleByMagazine.PeopleByMagazineRequestBuilder PeopleByMagazine + { + get => new global::Marechai.App.PeopleByMagazine.PeopleByMagazineRequestBuilder(PathParameters, RequestAdapter); + } + /// The processor property + public global::Marechai.App.Processor.ProcessorRequestBuilder Processor + { + get => new global::Marechai.App.Processor.ProcessorRequestBuilder(PathParameters, RequestAdapter); + } + /// The processors property + public global::Marechai.App.Processors.ProcessorsRequestBuilder Processors + { + get => new global::Marechai.App.Processors.ProcessorsRequestBuilder(PathParameters, RequestAdapter); + } + /// The processorsByMachine property + public global::Marechai.App.ProcessorsByMachine.ProcessorsByMachineRequestBuilder ProcessorsByMachine + { + get => new global::Marechai.App.ProcessorsByMachine.ProcessorsByMachineRequestBuilder(PathParameters, RequestAdapter); + } + /// The resolutions property + public global::Marechai.App.Resolutions.ResolutionsRequestBuilder Resolutions + { + get => new global::Marechai.App.Resolutions.ResolutionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The resolutionsByGpu property + public global::Marechai.App.ResolutionsByGpu.ResolutionsByGpuRequestBuilder ResolutionsByGpu + { + get => new global::Marechai.App.ResolutionsByGpu.ResolutionsByGpuRequestBuilder(PathParameters, RequestAdapter); + } + /// The resolutionsByScreen property + public global::Marechai.App.ResolutionsByScreen.ResolutionsByScreenRequestBuilder ResolutionsByScreen + { + get => new global::Marechai.App.ResolutionsByScreen.ResolutionsByScreenRequestBuilder(PathParameters, RequestAdapter); + } + /// The screens property + public global::Marechai.App.Screens.ScreensRequestBuilder Screens + { + get => new global::Marechai.App.Screens.ScreensRequestBuilder(PathParameters, RequestAdapter); + } + /// The screensByMachine property + public global::Marechai.App.ScreensByMachine.ScreensByMachineRequestBuilder ScreensByMachine + { + get => new global::Marechai.App.ScreensByMachine.ScreensByMachineRequestBuilder(PathParameters, RequestAdapter); + } + /// The software property + public global::Marechai.App.Software.SoftwareRequestBuilder Software + { + get => new global::Marechai.App.Software.SoftwareRequestBuilder(PathParameters, RequestAdapter); + } + /// The soundSynths property + public global::Marechai.App.SoundSynths.SoundSynthsRequestBuilder SoundSynths + { + get => new global::Marechai.App.SoundSynths.SoundSynthsRequestBuilder(PathParameters, RequestAdapter); + } + /// The soundSynthsByMachine property + public global::Marechai.App.SoundSynthsByMachine.SoundSynthsByMachineRequestBuilder SoundSynthsByMachine + { + get => new global::Marechai.App.SoundSynthsByMachine.SoundSynthsByMachineRequestBuilder(PathParameters, RequestAdapter); + } + /// The storageByMachine property + public global::Marechai.App.StorageByMachine.StorageByMachineRequestBuilder StorageByMachine + { + get => new global::Marechai.App.StorageByMachine.StorageByMachineRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// The request adapter to use to execute the requests. + public ApiClient(IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}", new Dictionary()) + { + ApiClientBuilder.RegisterDefaultSerializer(); + ApiClientBuilder.RegisterDefaultSerializer(); + ApiClientBuilder.RegisterDefaultSerializer(); + ApiClientBuilder.RegisterDefaultSerializer(); + ApiClientBuilder.RegisterDefaultDeserializer(); + ApiClientBuilder.RegisterDefaultDeserializer(); + ApiClientBuilder.RegisterDefaultDeserializer(); + if (string.IsNullOrEmpty(RequestAdapter.BaseUrl)) + { + RequestAdapter.BaseUrl = "http://localhost:5023"; + } + PathParameters.TryAdd("baseurl", RequestAdapter.BaseUrl); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Auth/AuthRequestBuilder.cs b/Marechai.App/Services/Client/Auth/AuthRequestBuilder.cs new file mode 100644 index 00000000..44ded2ec --- /dev/null +++ b/Marechai.App/Services/Client/Auth/AuthRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Auth.Login; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Marechai.App.Auth +{ + /// + /// Builds and executes requests for operations under \auth + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AuthRequestBuilder : BaseRequestBuilder + { + /// The login property + public global::Marechai.App.Auth.Login.LoginRequestBuilder Login + { + get => new global::Marechai.App.Auth.Login.LoginRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AuthRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/auth", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AuthRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/auth", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Auth/Login/LoginRequestBuilder.cs b/Marechai.App/Services/Client/Auth/Login/LoginRequestBuilder.cs new file mode 100644 index 00000000..b3fcc151 --- /dev/null +++ b/Marechai.App/Services/Client/Auth/Login/LoginRequestBuilder.cs @@ -0,0 +1,98 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Auth.Login +{ + /// + /// Builds and executes requests for operations under \auth\login + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LoginRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LoginRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/auth/login", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LoginRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/auth/login", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.AuthRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.AuthRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.AuthResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.AuthRequest body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.AuthRequest body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Auth.Login.LoginRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Auth.Login.LoginRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LoginRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Books/BooksRequestBuilder.cs b/Marechai.App/Services/Client/Books/BooksRequestBuilder.cs new file mode 100644 index 00000000..52484a9f --- /dev/null +++ b/Marechai.App/Services/Client/Books/BooksRequestBuilder.cs @@ -0,0 +1,181 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Books.Companies; +using Marechai.App.Books.Item; +using Marechai.App.Books.Scans; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Books +{ + /// + /// Builds and executes requests for operations under \books + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BooksRequestBuilder : BaseRequestBuilder + { + /// The companies property + public global::Marechai.App.Books.Companies.CompaniesRequestBuilder Companies + { + get => new global::Marechai.App.Books.Companies.CompaniesRequestBuilder(PathParameters, RequestAdapter); + } + /// The scans property + public global::Marechai.App.Books.Scans.ScansRequestBuilder Scans + { + get => new global::Marechai.App.Books.Scans.ScansRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Marechai.App.books.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Books.Item.BookItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("book%2Did", position); + return new global::Marechai.App.Books.Item.BookItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.books.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Books.Item.BookItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("book%2Did", position); + return new global::Marechai.App.Books.Item.BookItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BooksRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BooksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books", rawUrl) + { + } + /// A List<global::Marechai.App.Models.BookDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.BookDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.BookDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.BookDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.BookDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.BookDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Books.BooksRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Books.BooksRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BooksRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BooksRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Books/Companies/CompaniesRequestBuilder.cs b/Marechai.App/Services/Client/Books/Companies/CompaniesRequestBuilder.cs new file mode 100644 index 00000000..9dd5cec7 --- /dev/null +++ b/Marechai.App/Services/Client/Books/Companies/CompaniesRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Books.Companies.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Books.Companies +{ + /// + /// Builds and executes requests for operations under \books\companies + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.books.companies.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Books.Companies.Item.CompaniesItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Books.Companies.Item.CompaniesItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.books.companies.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Books.Companies.Item.CompaniesItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Books.Companies.Item.CompaniesItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/companies", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/companies", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.CompanyByBookDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.CompanyByBookDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyByBookDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyByBookDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Books.Companies.CompaniesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Books.Companies.CompaniesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Books/Companies/Item/CompaniesItemRequestBuilder.cs b/Marechai.App/Services/Client/Books/Companies/Item/CompaniesItemRequestBuilder.cs new file mode 100644 index 00000000..bb17f7a5 --- /dev/null +++ b/Marechai.App/Services/Client/Books/Companies/Item/CompaniesItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Books.Companies.Item +{ + /// + /// Builds and executes requests for operations under \books\companies\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompaniesItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/companies/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompaniesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/companies/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Books.Companies.Item.CompaniesItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Books.Companies.Item.CompaniesItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Books/Item/BookItemRequestBuilder.cs b/Marechai.App/Services/Client/Books/Item/BookItemRequestBuilder.cs new file mode 100644 index 00000000..59765e03 --- /dev/null +++ b/Marechai.App/Services/Client/Books/Item/BookItemRequestBuilder.cs @@ -0,0 +1,228 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Books.Item.Companies; +using Marechai.App.Books.Item.MachineFamilies; +using Marechai.App.Books.Item.Machines; +using Marechai.App.Books.Item.People; +using Marechai.App.Books.Item.Scans; +using Marechai.App.Books.Item.Synopsis; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Books.Item +{ + /// + /// Builds and executes requests for operations under \books\{book-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BookItemRequestBuilder : BaseRequestBuilder + { + /// The companies property + public global::Marechai.App.Books.Item.Companies.CompaniesRequestBuilder Companies + { + get => new global::Marechai.App.Books.Item.Companies.CompaniesRequestBuilder(PathParameters, RequestAdapter); + } + /// The machineFamilies property + public global::Marechai.App.Books.Item.MachineFamilies.MachineFamiliesRequestBuilder MachineFamilies + { + get => new global::Marechai.App.Books.Item.MachineFamilies.MachineFamiliesRequestBuilder(PathParameters, RequestAdapter); + } + /// The machines property + public global::Marechai.App.Books.Item.Machines.MachinesRequestBuilder Machines + { + get => new global::Marechai.App.Books.Item.Machines.MachinesRequestBuilder(PathParameters, RequestAdapter); + } + /// The people property + public global::Marechai.App.Books.Item.People.PeopleRequestBuilder People + { + get => new global::Marechai.App.Books.Item.People.PeopleRequestBuilder(PathParameters, RequestAdapter); + } + /// The scans property + public global::Marechai.App.Books.Item.Scans.ScansRequestBuilder Scans + { + get => new global::Marechai.App.Books.Item.Scans.ScansRequestBuilder(PathParameters, RequestAdapter); + } + /// The synopsis property + public global::Marechai.App.Books.Item.Synopsis.SynopsisRequestBuilder Synopsis + { + get => new global::Marechai.App.Books.Item.Synopsis.SynopsisRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BookItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BookItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.BookDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.BookDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.BookDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.BookDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.BookDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Books.Item.BookItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Books.Item.BookItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BookItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BookItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BookItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Books/Item/Companies/CompaniesRequestBuilder.cs b/Marechai.App/Services/Client/Books/Item/Companies/CompaniesRequestBuilder.cs new file mode 100644 index 00000000..b8a0a10d --- /dev/null +++ b/Marechai.App/Services/Client/Books/Item/Companies/CompaniesRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Books.Item.Companies +{ + /// + /// Builds and executes requests for operations under \books\{book-id}\companies + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/companies", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/companies", rawUrl) + { + } + /// A List<global::Marechai.App.Models.CompanyByBookDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.CompanyByBookDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Books.Item.Companies.CompaniesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Books.Item.Companies.CompaniesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Books/Item/MachineFamilies/MachineFamiliesRequestBuilder.cs b/Marechai.App/Services/Client/Books/Item/MachineFamilies/MachineFamiliesRequestBuilder.cs new file mode 100644 index 00000000..0eb03871 --- /dev/null +++ b/Marechai.App/Services/Client/Books/Item/MachineFamilies/MachineFamiliesRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Books.Item.MachineFamilies +{ + /// + /// Builds and executes requests for operations under \books\{book-id}\machine-families + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachineFamiliesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MachineFamiliesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/machine-families", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MachineFamiliesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/machine-families", rawUrl) + { + } + /// A List<global::Marechai.App.Models.BookByMachineFamilyDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.BookByMachineFamilyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Books.Item.MachineFamilies.MachineFamiliesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Books.Item.MachineFamilies.MachineFamiliesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachineFamiliesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Books/Item/Machines/MachinesRequestBuilder.cs b/Marechai.App/Services/Client/Books/Item/Machines/MachinesRequestBuilder.cs new file mode 100644 index 00000000..b77df1c0 --- /dev/null +++ b/Marechai.App/Services/Client/Books/Item/Machines/MachinesRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Books.Item.Machines +{ + /// + /// Builds and executes requests for operations under \books\{book-id}\machines + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MachinesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/machines", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MachinesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/machines", rawUrl) + { + } + /// A List<global::Marechai.App.Models.BookByMachineDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.BookByMachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Books.Item.Machines.MachinesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Books.Item.Machines.MachinesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Books/Item/People/PeopleRequestBuilder.cs b/Marechai.App/Services/Client/Books/Item/People/PeopleRequestBuilder.cs new file mode 100644 index 00000000..ac410ed5 --- /dev/null +++ b/Marechai.App/Services/Client/Books/Item/People/PeopleRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Books.Item.People +{ + /// + /// Builds and executes requests for operations under \books\{book-id}\people + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PeopleRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/people", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PeopleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/people", rawUrl) + { + } + /// A List<global::Marechai.App.Models.PersonByBookDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.PersonByBookDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Books.Item.People.PeopleRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Books.Item.People.PeopleRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Books/Item/Scans/ScansRequestBuilder.cs b/Marechai.App/Services/Client/Books/Item/Scans/ScansRequestBuilder.cs new file mode 100644 index 00000000..d0def0f3 --- /dev/null +++ b/Marechai.App/Services/Client/Books/Item/Scans/ScansRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Books.Item.Scans +{ + /// + /// Builds and executes requests for operations under \books\{book-id}\scans + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScansRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/scans", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScansRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/scans", rawUrl) + { + } + /// A List<Guid> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendPrimitiveCollectionAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Books.Item.Scans.ScansRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Books.Item.Scans.ScansRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Books/Item/Synopsis/SynopsisRequestBuilder.cs b/Marechai.App/Services/Client/Books/Item/Synopsis/SynopsisRequestBuilder.cs new file mode 100644 index 00000000..f2ad09d9 --- /dev/null +++ b/Marechai.App/Services/Client/Books/Item/Synopsis/SynopsisRequestBuilder.cs @@ -0,0 +1,91 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Books.Item.Synopsis +{ + /// + /// Builds and executes requests for operations under \books\{book-id}\synopsis + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SynopsisRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SynopsisRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/synopsis", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SynopsisRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/synopsis", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Books.Item.Synopsis.SynopsisRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Books.Item.Synopsis.SynopsisRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SynopsisRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Books/Scans/Item/ScansItemRequestBuilder.cs b/Marechai.App/Services/Client/Books/Scans/Item/ScansItemRequestBuilder.cs new file mode 100644 index 00000000..38007a1f --- /dev/null +++ b/Marechai.App/Services/Client/Books/Scans/Item/ScansItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Books.Scans.Item +{ + /// + /// Builds and executes requests for operations under \books\scans\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScansItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/scans/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScansItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/scans/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.BookScanDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.BookScanDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.BookScanDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.BookScanDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.BookScanDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Books.Scans.Item.ScansItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Books.Scans.Item.ScansItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Books/Scans/ScansRequestBuilder.cs b/Marechai.App/Services/Client/Books/Scans/ScansRequestBuilder.cs new file mode 100644 index 00000000..8a83501f --- /dev/null +++ b/Marechai.App/Services/Client/Books/Scans/ScansRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Books.Scans.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Books.Scans +{ + /// + /// Builds and executes requests for operations under \books\scans + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.books.scans.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Books.Scans.Item.ScansItemRequestBuilder this[Guid position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Books.Scans.Item.ScansItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.books.scans.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Books.Scans.Item.ScansItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Books.Scans.Item.ScansItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScansRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/scans", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScansRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/scans", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.BookScanDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.BookScanDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.BookScanDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.BookScanDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Books.Scans.ScansRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Books.Scans.ScansRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/BrowserTests/BrowserTestsRequestBuilder.cs b/Marechai.App/Services/Client/BrowserTests/BrowserTestsRequestBuilder.cs new file mode 100644 index 00000000..14c43029 --- /dev/null +++ b/Marechai.App/Services/Client/BrowserTests/BrowserTestsRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.BrowserTests +{ + /// + /// Builds and executes requests for operations under \browser-tests + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BrowserTestsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BrowserTestsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/browser-tests", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BrowserTestsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/browser-tests", rawUrl) + { + } + /// A List<global::Marechai.App.Models.BrowserTest> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.BrowserTest.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.BrowserTests.BrowserTestsRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.BrowserTests.BrowserTestsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BrowserTestsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/ByLetter/ByLetterRequestBuilder.cs b/Marechai.App/Services/Client/ByLetter/ByLetterRequestBuilder.cs new file mode 100644 index 00000000..073fae5a --- /dev/null +++ b/Marechai.App/Services/Client/ByLetter/ByLetterRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Marechai.App.ByLetter.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Marechai.App.ByLetter +{ + /// + /// Builds and executes requests for operations under \by-letter + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ByLetterRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.byLetter.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.ByLetter.Item.WithCItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("c", position); + return new global::Marechai.App.ByLetter.Item.WithCItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ByLetterRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/by-letter", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ByLetterRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/by-letter", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/ByLetter/Item/WithCItemRequestBuilder.cs b/Marechai.App/Services/Client/ByLetter/Item/WithCItemRequestBuilder.cs new file mode 100644 index 00000000..ade34d49 --- /dev/null +++ b/Marechai.App/Services/Client/ByLetter/Item/WithCItemRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.ByLetter.Item +{ + /// + /// Builds and executes requests for operations under \by-letter\{c} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithCItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/by-letter/{c}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithCItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/by-letter/{c}", rawUrl) + { + } + /// A List<global::Marechai.App.Models.MachineDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.MachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.ByLetter.Item.WithCItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.ByLetter.Item.WithCItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithCItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/ByYear/ByYearRequestBuilder.cs b/Marechai.App/Services/Client/ByYear/ByYearRequestBuilder.cs new file mode 100644 index 00000000..cd450212 --- /dev/null +++ b/Marechai.App/Services/Client/ByYear/ByYearRequestBuilder.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable CS0618 +using Marechai.App.ByYear.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Marechai.App.ByYear +{ + /// + /// Builds and executes requests for operations under \by-year + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ByYearRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.byYear.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.ByYear.Item.WithYearItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("year", position); + return new global::Marechai.App.ByYear.Item.WithYearItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.byYear.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.ByYear.Item.WithYearItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("year", position); + return new global::Marechai.App.ByYear.Item.WithYearItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ByYearRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/by-year", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ByYearRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/by-year", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/ByYear/Item/WithYearItemRequestBuilder.cs b/Marechai.App/Services/Client/ByYear/Item/WithYearItemRequestBuilder.cs new file mode 100644 index 00000000..ec736476 --- /dev/null +++ b/Marechai.App/Services/Client/ByYear/Item/WithYearItemRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.ByYear.Item +{ + /// + /// Builds and executes requests for operations under \by-year\{year} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithYearItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithYearItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/by-year/{year}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithYearItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/by-year/{year}", rawUrl) + { + } + /// A List<global::Marechai.App.Models.MachineDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.MachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.ByYear.Item.WithYearItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.ByYear.Item.WithYearItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithYearItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Companies/CompaniesRequestBuilder.cs b/Marechai.App/Services/Client/Companies/CompaniesRequestBuilder.cs new file mode 100644 index 00000000..071f2bca --- /dev/null +++ b/Marechai.App/Services/Client/Companies/CompaniesRequestBuilder.cs @@ -0,0 +1,181 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Companies.Item; +using Marechai.App.Companies.Letter; +using Marechai.App.Companies.Logos; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Companies +{ + /// + /// Builds and executes requests for operations under \companies + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilder : BaseRequestBuilder + { + /// The letter property + public global::Marechai.App.Companies.Letter.LetterRequestBuilder Letter + { + get => new global::Marechai.App.Companies.Letter.LetterRequestBuilder(PathParameters, RequestAdapter); + } + /// The logos property + public global::Marechai.App.Companies.Logos.LogosRequestBuilder Logos + { + get => new global::Marechai.App.Companies.Logos.LogosRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Marechai.App.companies.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Companies.Item.CompanyItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("company%2Did", position); + return new global::Marechai.App.Companies.Item.CompanyItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.companies.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Companies.Item.CompanyItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("company%2Did", position); + return new global::Marechai.App.Companies.Item.CompanyItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies", rawUrl) + { + } + /// A List<global::Marechai.App.Models.CompanyDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.CompanyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.CompanyDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.CompanyDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Companies.CompaniesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Companies.CompaniesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Companies/Item/CompanyItemRequestBuilder.cs b/Marechai.App/Services/Client/Companies/Item/CompanyItemRequestBuilder.cs new file mode 100644 index 00000000..09025c0d --- /dev/null +++ b/Marechai.App/Services/Client/Companies/Item/CompanyItemRequestBuilder.cs @@ -0,0 +1,216 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Companies.Item.Description; +using Marechai.App.Companies.Item.Logos; +using Marechai.App.Companies.Item.Machines; +using Marechai.App.Companies.Item.Soldto; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Companies.Item +{ + /// + /// Builds and executes requests for operations under \companies\{company-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompanyItemRequestBuilder : BaseRequestBuilder + { + /// The description property + public global::Marechai.App.Companies.Item.Description.DescriptionRequestBuilder Description + { + get => new global::Marechai.App.Companies.Item.Description.DescriptionRequestBuilder(PathParameters, RequestAdapter); + } + /// The logos property + public global::Marechai.App.Companies.Item.Logos.LogosRequestBuilder Logos + { + get => new global::Marechai.App.Companies.Item.Logos.LogosRequestBuilder(PathParameters, RequestAdapter); + } + /// The machines property + public global::Marechai.App.Companies.Item.Machines.MachinesRequestBuilder Machines + { + get => new global::Marechai.App.Companies.Item.Machines.MachinesRequestBuilder(PathParameters, RequestAdapter); + } + /// The soldto property + public global::Marechai.App.Companies.Item.Soldto.SoldtoRequestBuilder Soldto + { + get => new global::Marechai.App.Companies.Item.Soldto.SoldtoRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompanyItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompanyItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.CompanyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.CompanyDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.CompanyDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.CompanyDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.CompanyDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Companies.Item.CompanyItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Companies.Item.CompanyItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompanyItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompanyItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompanyItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Companies/Item/Description/DescriptionRequestBuilder.cs b/Marechai.App/Services/Client/Companies/Item/Description/DescriptionRequestBuilder.cs new file mode 100644 index 00000000..1380d63a --- /dev/null +++ b/Marechai.App/Services/Client/Companies/Item/Description/DescriptionRequestBuilder.cs @@ -0,0 +1,148 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Companies.Item.Description.Text; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Companies.Item.Description +{ + /// + /// Builds and executes requests for operations under \companies\{company-id}\description + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DescriptionRequestBuilder : BaseRequestBuilder + { + /// The text property + public global::Marechai.App.Companies.Item.Description.Text.TextRequestBuilder Text + { + get => new global::Marechai.App.Companies.Item.Description.Text.TextRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DescriptionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}/description", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DescriptionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}/description", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.CompanyDescriptionDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.CompanyDescriptionDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.CompanyDescriptionDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyDescriptionDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyDescriptionDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Companies.Item.Description.DescriptionRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Companies.Item.Description.DescriptionRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DescriptionRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DescriptionRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Companies/Item/Description/Text/TextRequestBuilder.cs b/Marechai.App/Services/Client/Companies/Item/Description/Text/TextRequestBuilder.cs new file mode 100644 index 00000000..1b2ce775 --- /dev/null +++ b/Marechai.App/Services/Client/Companies/Item/Description/Text/TextRequestBuilder.cs @@ -0,0 +1,91 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Companies.Item.Description.Text +{ + /// + /// Builds and executes requests for operations under \companies\{company-id}\description\text + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TextRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TextRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}/description/text", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TextRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}/description/text", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Companies.Item.Description.Text.TextRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Companies.Item.Description.Text.TextRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TextRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Companies/Item/Logos/LogosRequestBuilder.cs b/Marechai.App/Services/Client/Companies/Item/Logos/LogosRequestBuilder.cs new file mode 100644 index 00000000..79b1d845 --- /dev/null +++ b/Marechai.App/Services/Client/Companies/Item/Logos/LogosRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Companies.Item.Logos +{ + /// + /// Builds and executes requests for operations under \companies\{company-id}\logos + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LogosRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LogosRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}/logos", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LogosRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}/logos", rawUrl) + { + } + /// A List<global::Marechai.App.Models.CompanyLogoDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.CompanyLogoDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Companies.Item.Logos.LogosRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Companies.Item.Logos.LogosRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LogosRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Companies/Item/Machines/MachinesRequestBuilder.cs b/Marechai.App/Services/Client/Companies/Item/Machines/MachinesRequestBuilder.cs new file mode 100644 index 00000000..d5a2d95b --- /dev/null +++ b/Marechai.App/Services/Client/Companies/Item/Machines/MachinesRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Companies.Item.Machines +{ + /// + /// Builds and executes requests for operations under \companies\{company-id}\machines + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MachinesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}/machines", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MachinesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}/machines", rawUrl) + { + } + /// A List<global::Marechai.App.Models.MachineDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.MachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Companies.Item.Machines.MachinesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Companies.Item.Machines.MachinesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Companies/Item/Soldto/SoldtoRequestBuilder.cs b/Marechai.App/Services/Client/Companies/Item/Soldto/SoldtoRequestBuilder.cs new file mode 100644 index 00000000..cc0a5277 --- /dev/null +++ b/Marechai.App/Services/Client/Companies/Item/Soldto/SoldtoRequestBuilder.cs @@ -0,0 +1,91 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Companies.Item.Soldto +{ + /// + /// Builds and executes requests for operations under \companies\{company-id}\soldto + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SoldtoRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SoldtoRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}/soldto", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SoldtoRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}/soldto", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.CompanyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Companies.Item.Soldto.SoldtoRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Companies.Item.Soldto.SoldtoRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SoldtoRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Companies/Letter/Item/LetterItemRequestBuilder.cs b/Marechai.App/Services/Client/Companies/Letter/Item/LetterItemRequestBuilder.cs new file mode 100644 index 00000000..5b181362 --- /dev/null +++ b/Marechai.App/Services/Client/Companies/Letter/Item/LetterItemRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Companies.Letter.Item +{ + /// + /// Builds and executes requests for operations under \companies\letter\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LetterItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LetterItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/letter/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LetterItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/letter/{id}", rawUrl) + { + } + /// A List<global::Marechai.App.Models.CompanyDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.CompanyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Companies.Letter.Item.LetterItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Companies.Letter.Item.LetterItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LetterItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Companies/Letter/LetterRequestBuilder.cs b/Marechai.App/Services/Client/Companies/Letter/LetterRequestBuilder.cs new file mode 100644 index 00000000..68146804 --- /dev/null +++ b/Marechai.App/Services/Client/Companies/Letter/LetterRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Companies.Letter.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Marechai.App.Companies.Letter +{ + /// + /// Builds and executes requests for operations under \companies\letter + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LetterRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.companies.letter.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Companies.Letter.Item.LetterItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Companies.Letter.Item.LetterItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LetterRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/letter", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LetterRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/letter", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Companies/Logos/ChangeYear/ChangeYearRequestBuilder.cs b/Marechai.App/Services/Client/Companies/Logos/ChangeYear/ChangeYearRequestBuilder.cs new file mode 100644 index 00000000..55157e3a --- /dev/null +++ b/Marechai.App/Services/Client/Companies/Logos/ChangeYear/ChangeYearRequestBuilder.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Companies.Logos.ChangeYear.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Marechai.App.Companies.Logos.ChangeYear +{ + /// + /// Builds and executes requests for operations under \companies\logos\change-year + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ChangeYearRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.companies.logos.changeYear.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.companies.logos.changeYear.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ChangeYearRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/logos/change-year", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ChangeYearRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/logos/change-year", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Companies/Logos/ChangeYear/Item/ChangeYearItemRequestBuilder.cs b/Marechai.App/Services/Client/Companies/Logos/ChangeYear/Item/ChangeYearItemRequestBuilder.cs new file mode 100644 index 00000000..d7487815 --- /dev/null +++ b/Marechai.App/Services/Client/Companies/Logos/ChangeYear/Item/ChangeYearItemRequestBuilder.cs @@ -0,0 +1,175 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Companies.Logos.ChangeYear.Item +{ + /// + /// Builds and executes requests for operations under \companies\logos\change-year\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ChangeYearItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ChangeYearItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/logos/change-year/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ChangeYearItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/logos/change-year/{id}", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder.ChangeYearPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder.ChangeYearPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder.ChangeYearPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder.ChangeYearPutRequestBody body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ChangeYearItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ChangeYearPutRequestBody : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember1? ChangeYearPutRequestBodyMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember1 ChangeYearPutRequestBodyMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember2? ChangeYearPutRequestBodyMember2 { get; set; } +#nullable restore +#else + public global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember2 ChangeYearPutRequestBodyMember2 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder.ChangeYearPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder.ChangeYearPutRequestBody(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ChangeYearPutRequestBodyMember1 = new global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ChangeYearPutRequestBodyMember2 = new global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember2(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(ChangeYearPutRequestBodyMember1 != null) + { + return ChangeYearPutRequestBodyMember1.GetFieldDeserializers(); + } + else if(ChangeYearPutRequestBodyMember2 != null) + { + return ChangeYearPutRequestBodyMember2.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(ChangeYearPutRequestBodyMember1 != null) + { + writer.WriteObjectValue(null, ChangeYearPutRequestBodyMember1); + } + else if(ChangeYearPutRequestBodyMember2 != null) + { + writer.WriteObjectValue(null, ChangeYearPutRequestBodyMember2); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Companies/Logos/ChangeYear/Item/ChangeYearPutRequestBodyMember1.cs b/Marechai.App/Services/Client/Companies/Logos/ChangeYear/Item/ChangeYearPutRequestBodyMember1.cs new file mode 100644 index 00000000..510cee7c --- /dev/null +++ b/Marechai.App/Services/Client/Companies/Logos/ChangeYear/Item/ChangeYearPutRequestBodyMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Companies.Logos.ChangeYear.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChangeYearPutRequestBodyMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ChangeYearPutRequestBodyMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Companies/Logos/ChangeYear/Item/ChangeYearPutRequestBodyMember2.cs b/Marechai.App/Services/Client/Companies/Logos/ChangeYear/Item/ChangeYearPutRequestBodyMember2.cs new file mode 100644 index 00000000..78989fa2 --- /dev/null +++ b/Marechai.App/Services/Client/Companies/Logos/ChangeYear/Item/ChangeYearPutRequestBodyMember2.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Companies.Logos.ChangeYear.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChangeYearPutRequestBodyMember2 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ChangeYearPutRequestBodyMember2() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember2 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember2(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Companies/Logos/Item/LogosItemRequestBuilder.cs b/Marechai.App/Services/Client/Companies/Logos/Item/LogosItemRequestBuilder.cs new file mode 100644 index 00000000..7717393c --- /dev/null +++ b/Marechai.App/Services/Client/Companies/Logos/Item/LogosItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Companies.Logos.Item +{ + /// + /// Builds and executes requests for operations under \companies\logos\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LogosItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LogosItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/logos/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LogosItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/logos/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Companies.Logos.Item.LogosItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Companies.Logos.Item.LogosItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LogosItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Companies/Logos/LogosRequestBuilder.cs b/Marechai.App/Services/Client/Companies/Logos/LogosRequestBuilder.cs new file mode 100644 index 00000000..511b7184 --- /dev/null +++ b/Marechai.App/Services/Client/Companies/Logos/LogosRequestBuilder.cs @@ -0,0 +1,130 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Companies.Logos.ChangeYear; +using Marechai.App.Companies.Logos.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Companies.Logos +{ + /// + /// Builds and executes requests for operations under \companies\logos + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LogosRequestBuilder : BaseRequestBuilder + { + /// The changeYear property + public global::Marechai.App.Companies.Logos.ChangeYear.ChangeYearRequestBuilder ChangeYear + { + get => new global::Marechai.App.Companies.Logos.ChangeYear.ChangeYearRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Marechai.App.companies.logos.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Companies.Logos.Item.LogosItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Companies.Logos.Item.LogosItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.companies.logos.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Companies.Logos.Item.LogosItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Companies.Logos.Item.LogosItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LogosRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/logos", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LogosRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/logos", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.CompanyLogoDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.CompanyLogoDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyLogoDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyLogoDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Companies.Logos.LogosRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Companies.Logos.LogosRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LogosRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Computers/ComputersRequestBuilder.cs b/Marechai.App/Services/Client/Computers/ComputersRequestBuilder.cs new file mode 100644 index 00000000..784292ea --- /dev/null +++ b/Marechai.App/Services/Client/Computers/ComputersRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Computers +{ + /// + /// Builds and executes requests for operations under \computers + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ComputersRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ComputersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/computers", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ComputersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/computers", rawUrl) + { + } + /// A List<global::Marechai.App.Models.MachineDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.MachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Computers.ComputersRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Computers.ComputersRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ComputersRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Consoles/ConsolesRequestBuilder.cs b/Marechai.App/Services/Client/Consoles/ConsolesRequestBuilder.cs new file mode 100644 index 00000000..a4cd09e1 --- /dev/null +++ b/Marechai.App/Services/Client/Consoles/ConsolesRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Consoles +{ + /// + /// Builds and executes requests for operations under \consoles + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConsolesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConsolesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/consoles", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ConsolesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/consoles", rawUrl) + { + } + /// A List<global::Marechai.App.Models.MachineDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.MachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Consoles.ConsolesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Consoles.ConsolesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConsolesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Count/CountRequestBuilder.cs b/Marechai.App/Services/Client/Count/CountRequestBuilder.cs new file mode 100644 index 00000000..6819c1ae --- /dev/null +++ b/Marechai.App/Services/Client/Count/CountRequestBuilder.cs @@ -0,0 +1,91 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Count +{ + /// + /// Builds and executes requests for operations under \count + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/count", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/count", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Count.CountRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Count.CountRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Countries/CountriesRequestBuilder.cs b/Marechai.App/Services/Client/Countries/CountriesRequestBuilder.cs new file mode 100644 index 00000000..d30a1d61 --- /dev/null +++ b/Marechai.App/Services/Client/Countries/CountriesRequestBuilder.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Countries.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Marechai.App.Countries +{ + /// + /// Builds and executes requests for operations under \countries + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountriesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.countries.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Countries.Item.CountriesItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Countries.Item.CountriesItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.countries.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Countries.Item.CountriesItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Countries.Item.CountriesItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Countries/Item/Companies/CompaniesRequestBuilder.cs b/Marechai.App/Services/Client/Countries/Item/Companies/CompaniesRequestBuilder.cs new file mode 100644 index 00000000..6b194b2d --- /dev/null +++ b/Marechai.App/Services/Client/Countries/Item/Companies/CompaniesRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Countries.Item.Companies +{ + /// + /// Builds and executes requests for operations under \countries\{id}\companies + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries/{id}/companies", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries/{id}/companies", rawUrl) + { + } + /// A List<global::Marechai.App.Models.CompanyDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.CompanyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Countries.Item.Companies.CompaniesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Countries.Item.Companies.CompaniesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Countries/Item/CountriesItemRequestBuilder.cs b/Marechai.App/Services/Client/Countries/Item/CountriesItemRequestBuilder.cs new file mode 100644 index 00000000..d3479384 --- /dev/null +++ b/Marechai.App/Services/Client/Countries/Item/CountriesItemRequestBuilder.cs @@ -0,0 +1,47 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Countries.Item.Companies; +using Marechai.App.Countries.Item.Name; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Marechai.App.Countries.Item +{ + /// + /// Builds and executes requests for operations under \countries\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountriesItemRequestBuilder : BaseRequestBuilder + { + /// The companies property + public global::Marechai.App.Countries.Item.Companies.CompaniesRequestBuilder Companies + { + get => new global::Marechai.App.Countries.Item.Companies.CompaniesRequestBuilder(PathParameters, RequestAdapter); + } + /// The name property + public global::Marechai.App.Countries.Item.Name.NameRequestBuilder Name + { + get => new global::Marechai.App.Countries.Item.Name.NameRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountriesItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountriesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries/{id}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Countries/Item/Name/NameRequestBuilder.cs b/Marechai.App/Services/Client/Countries/Item/Name/NameRequestBuilder.cs new file mode 100644 index 00000000..cc6baa76 --- /dev/null +++ b/Marechai.App/Services/Client/Countries/Item/Name/NameRequestBuilder.cs @@ -0,0 +1,91 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Countries.Item.Name +{ + /// + /// Builds and executes requests for operations under \countries\{id}\name + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NameRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public NameRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries/{id}/name", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public NameRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries/{id}/name", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Countries.Item.Name.NameRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Countries.Item.Name.NameRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NameRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Currencies/CurrenciesRequestBuilder.cs b/Marechai.App/Services/Client/Currencies/CurrenciesRequestBuilder.cs new file mode 100644 index 00000000..af5c6c51 --- /dev/null +++ b/Marechai.App/Services/Client/Currencies/CurrenciesRequestBuilder.cs @@ -0,0 +1,47 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Currencies.Inflation; +using Marechai.App.Currencies.Pegging; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Marechai.App.Currencies +{ + /// + /// Builds and executes requests for operations under \currencies + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CurrenciesRequestBuilder : BaseRequestBuilder + { + /// The inflation property + public global::Marechai.App.Currencies.Inflation.InflationRequestBuilder Inflation + { + get => new global::Marechai.App.Currencies.Inflation.InflationRequestBuilder(PathParameters, RequestAdapter); + } + /// The pegging property + public global::Marechai.App.Currencies.Pegging.PeggingRequestBuilder Pegging + { + get => new global::Marechai.App.Currencies.Pegging.PeggingRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CurrenciesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/currencies", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CurrenciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/currencies", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Currencies/Inflation/InflationRequestBuilder.cs b/Marechai.App/Services/Client/Currencies/Inflation/InflationRequestBuilder.cs new file mode 100644 index 00000000..33953f2e --- /dev/null +++ b/Marechai.App/Services/Client/Currencies/Inflation/InflationRequestBuilder.cs @@ -0,0 +1,169 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Currencies.Inflation.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Currencies.Inflation +{ + /// + /// Builds and executes requests for operations under \currencies\inflation + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InflationRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.currencies.inflation.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Currencies.Inflation.Item.InflationItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Currencies.Inflation.Item.InflationItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.currencies.inflation.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Currencies.Inflation.Item.InflationItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Currencies.Inflation.Item.InflationItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InflationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/currencies/inflation", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InflationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/currencies/inflation", rawUrl) + { + } + /// A List<global::Marechai.App.Models.CurrencyInflationDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.CurrencyInflationDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.CurrencyInflationDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.CurrencyInflationDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CurrencyInflationDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CurrencyInflationDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Currencies.Inflation.InflationRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Currencies.Inflation.InflationRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InflationRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InflationRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Currencies/Inflation/Item/InflationItemRequestBuilder.cs b/Marechai.App/Services/Client/Currencies/Inflation/Item/InflationItemRequestBuilder.cs new file mode 100644 index 00000000..2572fb95 --- /dev/null +++ b/Marechai.App/Services/Client/Currencies/Inflation/Item/InflationItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Currencies.Inflation.Item +{ + /// + /// Builds and executes requests for operations under \currencies\inflation\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InflationItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InflationItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/currencies/inflation/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InflationItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/currencies/inflation/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.CurrencyInflationDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.CurrencyInflationDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.CurrencyInflationDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.CurrencyInflationDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.CurrencyInflationDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Currencies.Inflation.Item.InflationItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Currencies.Inflation.Item.InflationItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InflationItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InflationItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InflationItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Currencies/Pegging/Item/PeggingItemRequestBuilder.cs b/Marechai.App/Services/Client/Currencies/Pegging/Item/PeggingItemRequestBuilder.cs new file mode 100644 index 00000000..e1744ee6 --- /dev/null +++ b/Marechai.App/Services/Client/Currencies/Pegging/Item/PeggingItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Currencies.Pegging.Item +{ + /// + /// Builds and executes requests for operations under \currencies\pegging\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeggingItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PeggingItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/currencies/pegging/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PeggingItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/currencies/pegging/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.CurrencyPeggingDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.CurrencyPeggingDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.CurrencyPeggingDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.CurrencyPeggingDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.CurrencyPeggingDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Currencies.Pegging.Item.PeggingItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Currencies.Pegging.Item.PeggingItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeggingItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeggingItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeggingItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Currencies/Pegging/PeggingRequestBuilder.cs b/Marechai.App/Services/Client/Currencies/Pegging/PeggingRequestBuilder.cs new file mode 100644 index 00000000..bc0b29e8 --- /dev/null +++ b/Marechai.App/Services/Client/Currencies/Pegging/PeggingRequestBuilder.cs @@ -0,0 +1,169 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Currencies.Pegging.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Currencies.Pegging +{ + /// + /// Builds and executes requests for operations under \currencies\pegging + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeggingRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.currencies.pegging.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Currencies.Pegging.Item.PeggingItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Currencies.Pegging.Item.PeggingItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.currencies.pegging.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Currencies.Pegging.Item.PeggingItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Currencies.Pegging.Item.PeggingItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PeggingRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/currencies/pegging", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PeggingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/currencies/pegging", rawUrl) + { + } + /// A List<global::Marechai.App.Models.CurrencyPeggingDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.CurrencyPeggingDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.CurrencyPeggingDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.CurrencyPeggingDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CurrencyPeggingDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CurrencyPeggingDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Currencies.Pegging.PeggingRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Currencies.Pegging.PeggingRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeggingRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeggingRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Documents/Companies/CompaniesRequestBuilder.cs b/Marechai.App/Services/Client/Documents/Companies/CompaniesRequestBuilder.cs new file mode 100644 index 00000000..04764a5f --- /dev/null +++ b/Marechai.App/Services/Client/Documents/Companies/CompaniesRequestBuilder.cs @@ -0,0 +1,169 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Documents.Companies.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Documents.Companies +{ + /// + /// Builds and executes requests for operations under \documents\companies + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.documents.companies.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Documents.Companies.Item.CompaniesItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Documents.Companies.Item.CompaniesItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.documents.companies.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Documents.Companies.Item.CompaniesItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Documents.Companies.Item.CompaniesItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/companies", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/companies", rawUrl) + { + } + /// A List<global::Marechai.App.Models.DocumentCompanyDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.DocumentCompanyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.DocumentCompanyDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.DocumentCompanyDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentCompanyDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentCompanyDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Documents.Companies.CompaniesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Documents.Companies.CompaniesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Documents/Companies/Item/CompaniesItemRequestBuilder.cs b/Marechai.App/Services/Client/Documents/Companies/Item/CompaniesItemRequestBuilder.cs new file mode 100644 index 00000000..2d353c98 --- /dev/null +++ b/Marechai.App/Services/Client/Documents/Companies/Item/CompaniesItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Documents.Companies.Item +{ + /// + /// Builds and executes requests for operations under \documents\companies\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompaniesItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/companies/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompaniesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/companies/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.DocumentCompanyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.DocumentCompanyDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.DocumentCompanyDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.DocumentCompanyDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.DocumentCompanyDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Documents.Companies.Item.CompaniesItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Documents.Companies.Item.CompaniesItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Documents/DocumentsRequestBuilder.cs b/Marechai.App/Services/Client/Documents/DocumentsRequestBuilder.cs new file mode 100644 index 00000000..e66bc848 --- /dev/null +++ b/Marechai.App/Services/Client/Documents/DocumentsRequestBuilder.cs @@ -0,0 +1,193 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Documents.Companies; +using Marechai.App.Documents.Item; +using Marechai.App.Documents.People; +using Marechai.App.Documents.Roles; +using Marechai.App.Documents.Scans; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Documents +{ + /// + /// Builds and executes requests for operations under \documents + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DocumentsRequestBuilder : BaseRequestBuilder + { + /// The companies property + public global::Marechai.App.Documents.Companies.CompaniesRequestBuilder Companies + { + get => new global::Marechai.App.Documents.Companies.CompaniesRequestBuilder(PathParameters, RequestAdapter); + } + /// The people property + public global::Marechai.App.Documents.People.PeopleRequestBuilder People + { + get => new global::Marechai.App.Documents.People.PeopleRequestBuilder(PathParameters, RequestAdapter); + } + /// The roles property + public global::Marechai.App.Documents.Roles.RolesRequestBuilder Roles + { + get => new global::Marechai.App.Documents.Roles.RolesRequestBuilder(PathParameters, RequestAdapter); + } + /// The scans property + public global::Marechai.App.Documents.Scans.ScansRequestBuilder Scans + { + get => new global::Marechai.App.Documents.Scans.ScansRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Marechai.App.documents.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Documents.Item.DocumentItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("document%2Did", position); + return new global::Marechai.App.Documents.Item.DocumentItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.documents.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Documents.Item.DocumentItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("document%2Did", position); + return new global::Marechai.App.Documents.Item.DocumentItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DocumentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DocumentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents", rawUrl) + { + } + /// A List<global::Marechai.App.Models.DocumentDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.DocumentDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.DocumentDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.DocumentDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Documents.DocumentsRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Documents.DocumentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DocumentsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DocumentsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Documents/Item/Companies/CompaniesRequestBuilder.cs b/Marechai.App/Services/Client/Documents/Item/Companies/CompaniesRequestBuilder.cs new file mode 100644 index 00000000..0c501488 --- /dev/null +++ b/Marechai.App/Services/Client/Documents/Item/Companies/CompaniesRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Documents.Item.Companies +{ + /// + /// Builds and executes requests for operations under \documents\{document-id}\companies + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/companies", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/companies", rawUrl) + { + } + /// A List<global::Marechai.App.Models.CompanyByDocumentDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.CompanyByDocumentDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Documents.Item.Companies.CompaniesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Documents.Item.Companies.CompaniesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Documents/Item/DocumentItemRequestBuilder.cs b/Marechai.App/Services/Client/Documents/Item/DocumentItemRequestBuilder.cs new file mode 100644 index 00000000..f9880a81 --- /dev/null +++ b/Marechai.App/Services/Client/Documents/Item/DocumentItemRequestBuilder.cs @@ -0,0 +1,228 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Documents.Item.Companies; +using Marechai.App.Documents.Item.MachineFamilies; +using Marechai.App.Documents.Item.Machines; +using Marechai.App.Documents.Item.People; +using Marechai.App.Documents.Item.Scans; +using Marechai.App.Documents.Item.Synopsis; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Documents.Item +{ + /// + /// Builds and executes requests for operations under \documents\{document-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DocumentItemRequestBuilder : BaseRequestBuilder + { + /// The companies property + public global::Marechai.App.Documents.Item.Companies.CompaniesRequestBuilder Companies + { + get => new global::Marechai.App.Documents.Item.Companies.CompaniesRequestBuilder(PathParameters, RequestAdapter); + } + /// The machineFamilies property + public global::Marechai.App.Documents.Item.MachineFamilies.MachineFamiliesRequestBuilder MachineFamilies + { + get => new global::Marechai.App.Documents.Item.MachineFamilies.MachineFamiliesRequestBuilder(PathParameters, RequestAdapter); + } + /// The machines property + public global::Marechai.App.Documents.Item.Machines.MachinesRequestBuilder Machines + { + get => new global::Marechai.App.Documents.Item.Machines.MachinesRequestBuilder(PathParameters, RequestAdapter); + } + /// The people property + public global::Marechai.App.Documents.Item.People.PeopleRequestBuilder People + { + get => new global::Marechai.App.Documents.Item.People.PeopleRequestBuilder(PathParameters, RequestAdapter); + } + /// The scans property + public global::Marechai.App.Documents.Item.Scans.ScansRequestBuilder Scans + { + get => new global::Marechai.App.Documents.Item.Scans.ScansRequestBuilder(PathParameters, RequestAdapter); + } + /// The synopsis property + public global::Marechai.App.Documents.Item.Synopsis.SynopsisRequestBuilder Synopsis + { + get => new global::Marechai.App.Documents.Item.Synopsis.SynopsisRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DocumentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DocumentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.DocumentDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.DocumentDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.DocumentDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.DocumentDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.DocumentDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Documents.Item.DocumentItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Documents.Item.DocumentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DocumentItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DocumentItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DocumentItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Documents/Item/MachineFamilies/MachineFamiliesRequestBuilder.cs b/Marechai.App/Services/Client/Documents/Item/MachineFamilies/MachineFamiliesRequestBuilder.cs new file mode 100644 index 00000000..faa1b5cc --- /dev/null +++ b/Marechai.App/Services/Client/Documents/Item/MachineFamilies/MachineFamiliesRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Documents.Item.MachineFamilies +{ + /// + /// Builds and executes requests for operations under \documents\{document-id}\machine-families + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachineFamiliesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MachineFamiliesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/machine-families", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MachineFamiliesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/machine-families", rawUrl) + { + } + /// A List<global::Marechai.App.Models.DocumentByMachineFamilyDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.DocumentByMachineFamilyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Documents.Item.MachineFamilies.MachineFamiliesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Documents.Item.MachineFamilies.MachineFamiliesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachineFamiliesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Documents/Item/Machines/MachinesRequestBuilder.cs b/Marechai.App/Services/Client/Documents/Item/Machines/MachinesRequestBuilder.cs new file mode 100644 index 00000000..290eea5a --- /dev/null +++ b/Marechai.App/Services/Client/Documents/Item/Machines/MachinesRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Documents.Item.Machines +{ + /// + /// Builds and executes requests for operations under \documents\{document-id}\machines + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MachinesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/machines", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MachinesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/machines", rawUrl) + { + } + /// A List<global::Marechai.App.Models.DocumentByMachineDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.DocumentByMachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Documents.Item.Machines.MachinesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Documents.Item.Machines.MachinesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Documents/Item/People/PeopleRequestBuilder.cs b/Marechai.App/Services/Client/Documents/Item/People/PeopleRequestBuilder.cs new file mode 100644 index 00000000..16c37639 --- /dev/null +++ b/Marechai.App/Services/Client/Documents/Item/People/PeopleRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Documents.Item.People +{ + /// + /// Builds and executes requests for operations under \documents\{document-id}\people + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PeopleRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/people", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PeopleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/people", rawUrl) + { + } + /// A List<global::Marechai.App.Models.PersonByDocumentDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.PersonByDocumentDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Documents.Item.People.PeopleRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Documents.Item.People.PeopleRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Documents/Item/Scans/ScansRequestBuilder.cs b/Marechai.App/Services/Client/Documents/Item/Scans/ScansRequestBuilder.cs new file mode 100644 index 00000000..d3ea2d0a --- /dev/null +++ b/Marechai.App/Services/Client/Documents/Item/Scans/ScansRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Documents.Item.Scans +{ + /// + /// Builds and executes requests for operations under \documents\{document-id}\scans + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScansRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/scans", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScansRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/scans", rawUrl) + { + } + /// A List<Guid> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendPrimitiveCollectionAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Documents.Item.Scans.ScansRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Documents.Item.Scans.ScansRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Documents/Item/Synopsis/SynopsisRequestBuilder.cs b/Marechai.App/Services/Client/Documents/Item/Synopsis/SynopsisRequestBuilder.cs new file mode 100644 index 00000000..c9604183 --- /dev/null +++ b/Marechai.App/Services/Client/Documents/Item/Synopsis/SynopsisRequestBuilder.cs @@ -0,0 +1,91 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Documents.Item.Synopsis +{ + /// + /// Builds and executes requests for operations under \documents\{document-id}\synopsis + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SynopsisRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SynopsisRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/synopsis", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SynopsisRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/synopsis", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Documents.Item.Synopsis.SynopsisRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Documents.Item.Synopsis.SynopsisRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SynopsisRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Documents/People/Item/PeopleItemRequestBuilder.cs b/Marechai.App/Services/Client/Documents/People/Item/PeopleItemRequestBuilder.cs new file mode 100644 index 00000000..14288d73 --- /dev/null +++ b/Marechai.App/Services/Client/Documents/People/Item/PeopleItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Documents.People.Item +{ + /// + /// Builds and executes requests for operations under \documents\people\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PeopleItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/people/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PeopleItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/people/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.DocumentPersonDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.DocumentPersonDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.DocumentPersonDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.DocumentPersonDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.DocumentPersonDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Documents.People.Item.PeopleItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Documents.People.Item.PeopleItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Documents/People/PeopleRequestBuilder.cs b/Marechai.App/Services/Client/Documents/People/PeopleRequestBuilder.cs new file mode 100644 index 00000000..58958126 --- /dev/null +++ b/Marechai.App/Services/Client/Documents/People/PeopleRequestBuilder.cs @@ -0,0 +1,169 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Documents.People.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Documents.People +{ + /// + /// Builds and executes requests for operations under \documents\people + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.documents.people.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Documents.People.Item.PeopleItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Documents.People.Item.PeopleItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.documents.people.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Documents.People.Item.PeopleItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Documents.People.Item.PeopleItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PeopleRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/people", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PeopleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/people", rawUrl) + { + } + /// A List<global::Marechai.App.Models.DocumentPersonDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.DocumentPersonDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.DocumentPersonDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.DocumentPersonDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentPersonDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentPersonDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Documents.People.PeopleRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Documents.People.PeopleRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Documents/Roles/Enabled/EnabledRequestBuilder.cs b/Marechai.App/Services/Client/Documents/Roles/Enabled/EnabledRequestBuilder.cs new file mode 100644 index 00000000..5d2fc41f --- /dev/null +++ b/Marechai.App/Services/Client/Documents/Roles/Enabled/EnabledRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Documents.Roles.Enabled +{ + /// + /// Builds and executes requests for operations under \documents\roles\enabled + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EnabledRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public EnabledRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/roles/enabled", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public EnabledRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/roles/enabled", rawUrl) + { + } + /// A List<global::Marechai.App.Models.DocumentRoleDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.DocumentRoleDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Documents.Roles.Enabled.EnabledRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Documents.Roles.Enabled.EnabledRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class EnabledRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Documents/Roles/Item/RolesItemRequestBuilder.cs b/Marechai.App/Services/Client/Documents/Roles/Item/RolesItemRequestBuilder.cs new file mode 100644 index 00000000..d19a9252 --- /dev/null +++ b/Marechai.App/Services/Client/Documents/Roles/Item/RolesItemRequestBuilder.cs @@ -0,0 +1,91 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Documents.Roles.Item +{ + /// + /// Builds and executes requests for operations under \documents\roles\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RolesItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RolesItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/roles/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RolesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/roles/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.DocumentRoleDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Documents.Roles.Item.RolesItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Documents.Roles.Item.RolesItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RolesItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Documents/Roles/RolesRequestBuilder.cs b/Marechai.App/Services/Client/Documents/Roles/RolesRequestBuilder.cs new file mode 100644 index 00000000..e96422b0 --- /dev/null +++ b/Marechai.App/Services/Client/Documents/Roles/RolesRequestBuilder.cs @@ -0,0 +1,111 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Documents.Roles.Enabled; +using Marechai.App.Documents.Roles.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Documents.Roles +{ + /// + /// Builds and executes requests for operations under \documents\roles + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RolesRequestBuilder : BaseRequestBuilder + { + /// The enabled property + public global::Marechai.App.Documents.Roles.Enabled.EnabledRequestBuilder Enabled + { + get => new global::Marechai.App.Documents.Roles.Enabled.EnabledRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Marechai.App.documents.roles.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Documents.Roles.Item.RolesItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Documents.Roles.Item.RolesItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RolesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/roles", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RolesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/roles", rawUrl) + { + } + /// A List<global::Marechai.App.Models.DocumentRoleDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.DocumentRoleDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Documents.Roles.RolesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Documents.Roles.RolesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RolesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Documents/Scans/Item/ScansItemRequestBuilder.cs b/Marechai.App/Services/Client/Documents/Scans/Item/ScansItemRequestBuilder.cs new file mode 100644 index 00000000..7ab598f7 --- /dev/null +++ b/Marechai.App/Services/Client/Documents/Scans/Item/ScansItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Documents.Scans.Item +{ + /// + /// Builds and executes requests for operations under \documents\scans\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScansItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/scans/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScansItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/scans/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.DocumentScanDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.DocumentScanDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.DocumentScanDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.DocumentScanDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.DocumentScanDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Documents.Scans.Item.ScansItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Documents.Scans.Item.ScansItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Documents/Scans/ScansRequestBuilder.cs b/Marechai.App/Services/Client/Documents/Scans/ScansRequestBuilder.cs new file mode 100644 index 00000000..a3233ff8 --- /dev/null +++ b/Marechai.App/Services/Client/Documents/Scans/ScansRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Documents.Scans.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Documents.Scans +{ + /// + /// Builds and executes requests for operations under \documents\scans + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.documents.scans.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Documents.Scans.Item.ScansItemRequestBuilder this[Guid position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Documents.Scans.Item.ScansItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.documents.scans.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Documents.Scans.Item.ScansItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Documents.Scans.Item.ScansItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScansRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/scans", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScansRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/scans", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.DocumentScanDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.DocumentScanDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentScanDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentScanDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Documents.Scans.ScansRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Documents.Scans.ScansRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Dumps/DumpsRequestBuilder.cs b/Marechai.App/Services/Client/Dumps/DumpsRequestBuilder.cs new file mode 100644 index 00000000..19dab662 --- /dev/null +++ b/Marechai.App/Services/Client/Dumps/DumpsRequestBuilder.cs @@ -0,0 +1,156 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Dumps.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Dumps +{ + /// + /// Builds and executes requests for operations under \dumps + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DumpsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.dumps.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Dumps.Item.DumpsItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Dumps.Item.DumpsItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DumpsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/dumps", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DumpsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/dumps", rawUrl) + { + } + /// A List<global::Marechai.App.Models.DumpDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.DumpDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.DumpDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.DumpDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DumpDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DumpDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Dumps.DumpsRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Dumps.DumpsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DumpsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DumpsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Dumps/Item/DumpsItemRequestBuilder.cs b/Marechai.App/Services/Client/Dumps/Item/DumpsItemRequestBuilder.cs new file mode 100644 index 00000000..4d096494 --- /dev/null +++ b/Marechai.App/Services/Client/Dumps/Item/DumpsItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Dumps.Item +{ + /// + /// Builds and executes requests for operations under \dumps\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DumpsItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DumpsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/dumps/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DumpsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/dumps/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.DumpDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.DumpDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.DumpDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.DumpDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.DumpDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Dumps.Item.DumpsItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Dumps.Item.DumpsItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DumpsItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DumpsItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DumpsItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Gpus/GpusRequestBuilder.cs b/Marechai.App/Services/Client/Gpus/GpusRequestBuilder.cs new file mode 100644 index 00000000..9bfcda21 --- /dev/null +++ b/Marechai.App/Services/Client/Gpus/GpusRequestBuilder.cs @@ -0,0 +1,169 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Gpus.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Gpus +{ + /// + /// Builds and executes requests for operations under \gpus + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GpusRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.gpus.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Gpus.Item.GpusItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Gpus.Item.GpusItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.gpus.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Gpus.Item.GpusItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Gpus.Item.GpusItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GpusRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gpus", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GpusRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gpus", rawUrl) + { + } + /// A List<global::Marechai.App.Models.GpuDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.GpuDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.GpuDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.GpuDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.GpuDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.GpuDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Gpus.GpusRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Gpus.GpusRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GpusRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GpusRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Gpus/Item/GpusItemRequestBuilder.cs b/Marechai.App/Services/Client/Gpus/Item/GpusItemRequestBuilder.cs new file mode 100644 index 00000000..ab641758 --- /dev/null +++ b/Marechai.App/Services/Client/Gpus/Item/GpusItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Gpus.Item +{ + /// + /// Builds and executes requests for operations under \gpus\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GpusItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GpusItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gpus/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GpusItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gpus/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.GpuDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.GpuDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.GpuDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.GpuDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.GpuDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Gpus.Item.GpusItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Gpus.Item.GpusItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GpusItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GpusItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GpusItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/InstructionSetExtensions/InstructionSetExtensionsRequestBuilder.cs b/Marechai.App/Services/Client/InstructionSetExtensions/InstructionSetExtensionsRequestBuilder.cs new file mode 100644 index 00000000..ab86014f --- /dev/null +++ b/Marechai.App/Services/Client/InstructionSetExtensions/InstructionSetExtensionsRequestBuilder.cs @@ -0,0 +1,175 @@ +// +#pragma warning disable CS0618 +using Marechai.App.InstructionSetExtensions.Item; +using Marechai.App.InstructionSetExtensions.VerifyUnique; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.InstructionSetExtensions +{ + /// + /// Builds and executes requests for operations under \instruction-set-extensions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstructionSetExtensionsRequestBuilder : BaseRequestBuilder + { + /// The verifyUnique property + public global::Marechai.App.InstructionSetExtensions.VerifyUnique.VerifyUniqueRequestBuilder VerifyUnique + { + get => new global::Marechai.App.InstructionSetExtensions.VerifyUnique.VerifyUniqueRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Marechai.App.instructionSetExtensions.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.InstructionSetExtensions.Item.InstructionSetExtensionsItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.InstructionSetExtensions.Item.InstructionSetExtensionsItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.instructionSetExtensions.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.InstructionSetExtensions.Item.InstructionSetExtensionsItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.InstructionSetExtensions.Item.InstructionSetExtensionsItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InstructionSetExtensionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InstructionSetExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions", rawUrl) + { + } + /// A List<global::Marechai.App.Models.InstructionSetExtensionDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.InstructionSetExtensionDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.InstructionSetExtensionDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.InstructionSetExtensionDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.InstructionSetExtensionDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.InstructionSetExtensionDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.InstructionSetExtensions.InstructionSetExtensionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.InstructionSetExtensions.InstructionSetExtensionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstructionSetExtensionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstructionSetExtensionsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/InstructionSetExtensions/Item/InstructionSetExtensionsItemRequestBuilder.cs b/Marechai.App/Services/Client/InstructionSetExtensions/Item/InstructionSetExtensionsItemRequestBuilder.cs new file mode 100644 index 00000000..0f2de4ba --- /dev/null +++ b/Marechai.App/Services/Client/InstructionSetExtensions/Item/InstructionSetExtensionsItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.InstructionSetExtensions.Item +{ + /// + /// Builds and executes requests for operations under \instruction-set-extensions\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstructionSetExtensionsItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InstructionSetExtensionsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InstructionSetExtensionsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.InstructionSetExtensionDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.InstructionSetExtensionDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.InstructionSetExtensionDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.InstructionSetExtensionDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.InstructionSetExtensionDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.InstructionSetExtensions.Item.InstructionSetExtensionsItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.InstructionSetExtensions.Item.InstructionSetExtensionsItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstructionSetExtensionsItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstructionSetExtensionsItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstructionSetExtensionsItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/InstructionSetExtensions/VerifyUnique/Item/WithExtensionItemRequestBuilder.cs b/Marechai.App/Services/Client/InstructionSetExtensions/VerifyUnique/Item/WithExtensionItemRequestBuilder.cs new file mode 100644 index 00000000..728d6d0d --- /dev/null +++ b/Marechai.App/Services/Client/InstructionSetExtensions/VerifyUnique/Item/WithExtensionItemRequestBuilder.cs @@ -0,0 +1,91 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.InstructionSetExtensions.VerifyUnique.Item +{ + /// + /// Builds and executes requests for operations under \instruction-set-extensions\verify-unique\{extension} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithExtensionItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithExtensionItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions/verify-unique/{extension}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithExtensionItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions/verify-unique/{extension}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.InstructionSetExtensions.VerifyUnique.Item.WithExtensionItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.InstructionSetExtensions.VerifyUnique.Item.WithExtensionItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithExtensionItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/InstructionSetExtensions/VerifyUnique/VerifyUniqueRequestBuilder.cs b/Marechai.App/Services/Client/InstructionSetExtensions/VerifyUnique/VerifyUniqueRequestBuilder.cs new file mode 100644 index 00000000..3afcf640 --- /dev/null +++ b/Marechai.App/Services/Client/InstructionSetExtensions/VerifyUnique/VerifyUniqueRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Marechai.App.InstructionSetExtensions.VerifyUnique.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Marechai.App.InstructionSetExtensions.VerifyUnique +{ + /// + /// Builds and executes requests for operations under \instruction-set-extensions\verify-unique + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VerifyUniqueRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.instructionSetExtensions.verifyUnique.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.InstructionSetExtensions.VerifyUnique.Item.WithExtensionItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("extension", position); + return new global::Marechai.App.InstructionSetExtensions.VerifyUnique.Item.WithExtensionItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public VerifyUniqueRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions/verify-unique", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public VerifyUniqueRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions/verify-unique", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/InstructionSetExtensionsByProcessor/InstructionSetExtensionsByProcessorRequestBuilder.cs b/Marechai.App/Services/Client/InstructionSetExtensionsByProcessor/InstructionSetExtensionsByProcessorRequestBuilder.cs new file mode 100644 index 00000000..e00bf3c9 --- /dev/null +++ b/Marechai.App/Services/Client/InstructionSetExtensionsByProcessor/InstructionSetExtensionsByProcessorRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Marechai.App.InstructionSetExtensionsByProcessor.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.InstructionSetExtensionsByProcessor +{ + /// + /// Builds and executes requests for operations under \instruction-set-extensions-by-processor + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstructionSetExtensionsByProcessorRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.instructionSetExtensionsByProcessor.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.InstructionSetExtensionsByProcessor.Item.InstructionSetExtensionsByProcessorItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.InstructionSetExtensionsByProcessor.Item.InstructionSetExtensionsByProcessorItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.instructionSetExtensionsByProcessor.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.InstructionSetExtensionsByProcessor.Item.InstructionSetExtensionsByProcessorItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.InstructionSetExtensionsByProcessor.Item.InstructionSetExtensionsByProcessorItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InstructionSetExtensionsByProcessorRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions-by-processor", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InstructionSetExtensionsByProcessorRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions-by-processor", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.InstructionSetExtensionByProcessorDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.InstructionSetExtensionByProcessorDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.InstructionSetExtensionByProcessorDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.InstructionSetExtensionByProcessorDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.InstructionSetExtensionsByProcessor.InstructionSetExtensionsByProcessorRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.InstructionSetExtensionsByProcessor.InstructionSetExtensionsByProcessorRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstructionSetExtensionsByProcessorRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/InstructionSetExtensionsByProcessor/Item/InstructionSetExtensionsByProcessorItemRequestBuilder.cs b/Marechai.App/Services/Client/InstructionSetExtensionsByProcessor/Item/InstructionSetExtensionsByProcessorItemRequestBuilder.cs new file mode 100644 index 00000000..42394730 --- /dev/null +++ b/Marechai.App/Services/Client/InstructionSetExtensionsByProcessor/Item/InstructionSetExtensionsByProcessorItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.InstructionSetExtensionsByProcessor.Item +{ + /// + /// Builds and executes requests for operations under \instruction-set-extensions-by-processor\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstructionSetExtensionsByProcessorItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InstructionSetExtensionsByProcessorItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions-by-processor/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InstructionSetExtensionsByProcessorItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions-by-processor/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.InstructionSetExtensionsByProcessor.Item.InstructionSetExtensionsByProcessorItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.InstructionSetExtensionsByProcessor.Item.InstructionSetExtensionsByProcessorItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstructionSetExtensionsByProcessorItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/InstructionSets/InstructionSetsRequestBuilder.cs b/Marechai.App/Services/Client/InstructionSets/InstructionSetsRequestBuilder.cs new file mode 100644 index 00000000..3928073d --- /dev/null +++ b/Marechai.App/Services/Client/InstructionSets/InstructionSetsRequestBuilder.cs @@ -0,0 +1,175 @@ +// +#pragma warning disable CS0618 +using Marechai.App.InstructionSets.Item; +using Marechai.App.InstructionSets.VerifyUnique; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.InstructionSets +{ + /// + /// Builds and executes requests for operations under \instruction-sets + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstructionSetsRequestBuilder : BaseRequestBuilder + { + /// The verifyUnique property + public global::Marechai.App.InstructionSets.VerifyUnique.VerifyUniqueRequestBuilder VerifyUnique + { + get => new global::Marechai.App.InstructionSets.VerifyUnique.VerifyUniqueRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Marechai.App.instructionSets.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.InstructionSets.Item.InstructionSetsItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.InstructionSets.Item.InstructionSetsItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.instructionSets.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.InstructionSets.Item.InstructionSetsItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.InstructionSets.Item.InstructionSetsItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InstructionSetsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-sets", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InstructionSetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-sets", rawUrl) + { + } + /// A List<global::Marechai.App.Models.InstructionSetDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.InstructionSetDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.InstructionSetDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.InstructionSetDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.InstructionSetDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.InstructionSetDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.InstructionSets.InstructionSetsRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.InstructionSets.InstructionSetsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstructionSetsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstructionSetsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/InstructionSets/Item/InstructionSetsItemRequestBuilder.cs b/Marechai.App/Services/Client/InstructionSets/Item/InstructionSetsItemRequestBuilder.cs new file mode 100644 index 00000000..506dfdc8 --- /dev/null +++ b/Marechai.App/Services/Client/InstructionSets/Item/InstructionSetsItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.InstructionSets.Item +{ + /// + /// Builds and executes requests for operations under \instruction-sets\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstructionSetsItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InstructionSetsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-sets/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InstructionSetsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-sets/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.InstructionSetDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.InstructionSetDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.InstructionSetDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.InstructionSetDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.InstructionSetDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.InstructionSets.Item.InstructionSetsItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.InstructionSets.Item.InstructionSetsItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstructionSetsItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstructionSetsItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstructionSetsItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/InstructionSets/VerifyUnique/Item/WithNameItemRequestBuilder.cs b/Marechai.App/Services/Client/InstructionSets/VerifyUnique/Item/WithNameItemRequestBuilder.cs new file mode 100644 index 00000000..de56f6f6 --- /dev/null +++ b/Marechai.App/Services/Client/InstructionSets/VerifyUnique/Item/WithNameItemRequestBuilder.cs @@ -0,0 +1,91 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.InstructionSets.VerifyUnique.Item +{ + /// + /// Builds and executes requests for operations under \instruction-sets\verify-unique\{name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithNameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-sets/verify-unique/{name}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithNameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-sets/verify-unique/{name}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.InstructionSets.VerifyUnique.Item.WithNameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.InstructionSets.VerifyUnique.Item.WithNameItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithNameItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/InstructionSets/VerifyUnique/VerifyUniqueRequestBuilder.cs b/Marechai.App/Services/Client/InstructionSets/VerifyUnique/VerifyUniqueRequestBuilder.cs new file mode 100644 index 00000000..ee86b4b5 --- /dev/null +++ b/Marechai.App/Services/Client/InstructionSets/VerifyUnique/VerifyUniqueRequestBuilder.cs @@ -0,0 +1,48 @@ +// +#pragma warning disable CS0618 +using Marechai.App.InstructionSets.VerifyUnique.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Marechai.App.InstructionSets.VerifyUnique +{ + /// + /// Builds and executes requests for operations under \instruction-sets\verify-unique + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VerifyUniqueRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.instructionSets.verifyUnique.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.InstructionSets.VerifyUnique.Item.WithNameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("name", position); + return new global::Marechai.App.InstructionSets.VerifyUnique.Item.WithNameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public VerifyUniqueRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-sets/verify-unique", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public VerifyUniqueRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-sets/verify-unique", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Iso31661Numeric/Iso31661NumericRequestBuilder.cs b/Marechai.App/Services/Client/Iso31661Numeric/Iso31661NumericRequestBuilder.cs new file mode 100644 index 00000000..f6f86735 --- /dev/null +++ b/Marechai.App/Services/Client/Iso31661Numeric/Iso31661NumericRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Iso31661Numeric +{ + /// + /// Builds and executes requests for operations under \iso31661-numeric + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Iso31661NumericRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Iso31661NumericRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/iso31661-numeric", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Iso31661NumericRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/iso31661-numeric", rawUrl) + { + } + /// A List<global::Marechai.App.Models.Iso31661NumericDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.Iso31661NumericDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Iso31661Numeric.Iso31661NumericRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Iso31661Numeric.Iso31661NumericRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Iso31661NumericRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Iso4217/Iso4217RequestBuilder.cs b/Marechai.App/Services/Client/Iso4217/Iso4217RequestBuilder.cs new file mode 100644 index 00000000..ef41a20f --- /dev/null +++ b/Marechai.App/Services/Client/Iso4217/Iso4217RequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Iso4217 +{ + /// + /// Builds and executes requests for operations under \iso4217 + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Iso4217RequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Iso4217RequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/iso4217", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public Iso4217RequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/iso4217", rawUrl) + { + } + /// A List<global::Marechai.App.Models.Iso4217Dto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.Iso4217Dto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Iso4217.Iso4217RequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Iso4217.Iso4217RequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Iso4217RequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Licenses/Item/LicensesItemRequestBuilder.cs b/Marechai.App/Services/Client/Licenses/Item/LicensesItemRequestBuilder.cs new file mode 100644 index 00000000..8fed0c98 --- /dev/null +++ b/Marechai.App/Services/Client/Licenses/Item/LicensesItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Licenses.Item +{ + /// + /// Builds and executes requests for operations under \licenses\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LicensesItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LicensesItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/licenses/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LicensesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/licenses/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.LicenseDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.LicenseDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.LicenseDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.LicenseDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.LicenseDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Licenses.Item.LicensesItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Licenses.Item.LicensesItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LicensesItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LicensesItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LicensesItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Licenses/LicensesRequestBuilder.cs b/Marechai.App/Services/Client/Licenses/LicensesRequestBuilder.cs new file mode 100644 index 00000000..302faf59 --- /dev/null +++ b/Marechai.App/Services/Client/Licenses/LicensesRequestBuilder.cs @@ -0,0 +1,169 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Licenses.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Licenses +{ + /// + /// Builds and executes requests for operations under \licenses + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LicensesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.licenses.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Licenses.Item.LicensesItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Licenses.Item.LicensesItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.licenses.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Licenses.Item.LicensesItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Licenses.Item.LicensesItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LicensesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/licenses", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LicensesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/licenses", rawUrl) + { + } + /// A List<global::Marechai.App.Models.LicenseDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.LicenseDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.LicenseDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.LicenseDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.LicenseDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.LicenseDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Licenses.LicensesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Licenses.LicensesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LicensesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LicensesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/MachineFamilies/Books/BooksRequestBuilder.cs b/Marechai.App/Services/Client/MachineFamilies/Books/BooksRequestBuilder.cs new file mode 100644 index 00000000..e409cd99 --- /dev/null +++ b/Marechai.App/Services/Client/MachineFamilies/Books/BooksRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Marechai.App.MachineFamilies.Books.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.MachineFamilies.Books +{ + /// + /// Builds and executes requests for operations under \machine-families\books + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BooksRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.machineFamilies.books.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.MachineFamilies.Books.Item.BooksItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.MachineFamilies.Books.Item.BooksItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.machineFamilies.books.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.MachineFamilies.Books.Item.BooksItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.MachineFamilies.Books.Item.BooksItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BooksRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families/books", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BooksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families/books", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.BookByMachineFamilyDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.BookByMachineFamilyDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.BookByMachineFamilyDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.BookByMachineFamilyDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.MachineFamilies.Books.BooksRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.MachineFamilies.Books.BooksRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BooksRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/MachineFamilies/Books/Item/BooksItemRequestBuilder.cs b/Marechai.App/Services/Client/MachineFamilies/Books/Item/BooksItemRequestBuilder.cs new file mode 100644 index 00000000..f2029710 --- /dev/null +++ b/Marechai.App/Services/Client/MachineFamilies/Books/Item/BooksItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.MachineFamilies.Books.Item +{ + /// + /// Builds and executes requests for operations under \machine-families\books\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BooksItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BooksItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families/books/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BooksItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families/books/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.MachineFamilies.Books.Item.BooksItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.MachineFamilies.Books.Item.BooksItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BooksItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/MachineFamilies/Documents/DocumentsRequestBuilder.cs b/Marechai.App/Services/Client/MachineFamilies/Documents/DocumentsRequestBuilder.cs new file mode 100644 index 00000000..94f95056 --- /dev/null +++ b/Marechai.App/Services/Client/MachineFamilies/Documents/DocumentsRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Marechai.App.MachineFamilies.Documents.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.MachineFamilies.Documents +{ + /// + /// Builds and executes requests for operations under \machine-families\documents + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DocumentsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.machineFamilies.documents.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.MachineFamilies.Documents.Item.DocumentsItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.MachineFamilies.Documents.Item.DocumentsItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.machineFamilies.documents.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.MachineFamilies.Documents.Item.DocumentsItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.MachineFamilies.Documents.Item.DocumentsItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DocumentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families/documents", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DocumentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families/documents", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.DocumentByMachineFamilyDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.DocumentByMachineFamilyDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentByMachineFamilyDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentByMachineFamilyDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.MachineFamilies.Documents.DocumentsRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.MachineFamilies.Documents.DocumentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DocumentsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/MachineFamilies/Documents/Item/DocumentsItemRequestBuilder.cs b/Marechai.App/Services/Client/MachineFamilies/Documents/Item/DocumentsItemRequestBuilder.cs new file mode 100644 index 00000000..36729bae --- /dev/null +++ b/Marechai.App/Services/Client/MachineFamilies/Documents/Item/DocumentsItemRequestBuilder.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.MachineFamilies.Documents.Item +{ + /// + /// Builds and executes requests for operations under \machine-families\documents\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DocumentsItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DocumentsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families/documents/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DocumentsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families/documents/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.MachineFamilies.Documents.Item.DocumentsItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.MachineFamilies.Documents.Item.DocumentsItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DocumentsItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/MachineFamilies/Item/MachineFamiliesItemRequestBuilder.cs b/Marechai.App/Services/Client/MachineFamilies/Item/MachineFamiliesItemRequestBuilder.cs new file mode 100644 index 00000000..864273be --- /dev/null +++ b/Marechai.App/Services/Client/MachineFamilies/Item/MachineFamiliesItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.MachineFamilies.Item +{ + /// + /// Builds and executes requests for operations under \machine-families\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachineFamiliesItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MachineFamiliesItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MachineFamiliesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.MachineFamilyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.MachineFamilyDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.MachineFamilyDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.MachineFamilyDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.MachineFamilyDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.MachineFamilies.Item.MachineFamiliesItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.MachineFamilies.Item.MachineFamiliesItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachineFamiliesItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachineFamiliesItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachineFamiliesItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/MachineFamilies/MachineFamiliesRequestBuilder.cs b/Marechai.App/Services/Client/MachineFamilies/MachineFamiliesRequestBuilder.cs new file mode 100644 index 00000000..abc3f6f5 --- /dev/null +++ b/Marechai.App/Services/Client/MachineFamilies/MachineFamiliesRequestBuilder.cs @@ -0,0 +1,181 @@ +// +#pragma warning disable CS0618 +using Marechai.App.MachineFamilies.Books; +using Marechai.App.MachineFamilies.Documents; +using Marechai.App.MachineFamilies.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.MachineFamilies +{ + /// + /// Builds and executes requests for operations under \machine-families + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachineFamiliesRequestBuilder : BaseRequestBuilder + { + /// The books property + public global::Marechai.App.MachineFamilies.Books.BooksRequestBuilder Books + { + get => new global::Marechai.App.MachineFamilies.Books.BooksRequestBuilder(PathParameters, RequestAdapter); + } + /// The documents property + public global::Marechai.App.MachineFamilies.Documents.DocumentsRequestBuilder Documents + { + get => new global::Marechai.App.MachineFamilies.Documents.DocumentsRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Marechai.App.machineFamilies.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.MachineFamilies.Item.MachineFamiliesItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.MachineFamilies.Item.MachineFamiliesItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.machineFamilies.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.MachineFamilies.Item.MachineFamiliesItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.MachineFamilies.Item.MachineFamiliesItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MachineFamiliesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MachineFamiliesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families", rawUrl) + { + } + /// A List<global::Marechai.App.Models.MachineFamilyDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.MachineFamilyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.MachineFamilyDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.MachineFamilyDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MachineFamilyDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MachineFamilyDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.MachineFamilies.MachineFamiliesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.MachineFamilies.MachineFamiliesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachineFamiliesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachineFamiliesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Machines/Books/BooksRequestBuilder.cs b/Marechai.App/Services/Client/Machines/Books/BooksRequestBuilder.cs new file mode 100644 index 00000000..c9bc1bbd --- /dev/null +++ b/Marechai.App/Services/Client/Machines/Books/BooksRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Machines.Books.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Machines.Books +{ + /// + /// Builds and executes requests for operations under \machines\books + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BooksRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.machines.books.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Machines.Books.Item.BooksItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Machines.Books.Item.BooksItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.machines.books.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Machines.Books.Item.BooksItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Machines.Books.Item.BooksItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BooksRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/books", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BooksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/books", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.BookByMachineDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.BookByMachineDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.BookByMachineDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.BookByMachineDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Machines.Books.BooksRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Machines.Books.BooksRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BooksRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Machines/Books/Item/BooksItemRequestBuilder.cs b/Marechai.App/Services/Client/Machines/Books/Item/BooksItemRequestBuilder.cs new file mode 100644 index 00000000..c9e93f1d --- /dev/null +++ b/Marechai.App/Services/Client/Machines/Books/Item/BooksItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Machines.Books.Item +{ + /// + /// Builds and executes requests for operations under \machines\books\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BooksItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BooksItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/books/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public BooksItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/books/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Machines.Books.Item.BooksItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Machines.Books.Item.BooksItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BooksItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Machines/Documents/DocumentsRequestBuilder.cs b/Marechai.App/Services/Client/Machines/Documents/DocumentsRequestBuilder.cs new file mode 100644 index 00000000..6ed8c90e --- /dev/null +++ b/Marechai.App/Services/Client/Machines/Documents/DocumentsRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Machines.Documents.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Machines.Documents +{ + /// + /// Builds and executes requests for operations under \machines\documents + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DocumentsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.machines.documents.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Machines.Documents.Item.DocumentsItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Machines.Documents.Item.DocumentsItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.machines.documents.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Machines.Documents.Item.DocumentsItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Machines.Documents.Item.DocumentsItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DocumentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/documents", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DocumentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/documents", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.DocumentByMachineDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.DocumentByMachineDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentByMachineDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentByMachineDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Machines.Documents.DocumentsRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Machines.Documents.DocumentsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DocumentsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Machines/Documents/Item/DocumentsItemRequestBuilder.cs b/Marechai.App/Services/Client/Machines/Documents/Item/DocumentsItemRequestBuilder.cs new file mode 100644 index 00000000..7d03b68c --- /dev/null +++ b/Marechai.App/Services/Client/Machines/Documents/Item/DocumentsItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Machines.Documents.Item +{ + /// + /// Builds and executes requests for operations under \machines\documents\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DocumentsItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DocumentsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/documents/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DocumentsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/documents/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Machines.Documents.Item.DocumentsItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Machines.Documents.Item.DocumentsItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DocumentsItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Machines/Gpus/ByMachine/ByMachineRequestBuilder.cs b/Marechai.App/Services/Client/Machines/Gpus/ByMachine/ByMachineRequestBuilder.cs new file mode 100644 index 00000000..686e9879 --- /dev/null +++ b/Marechai.App/Services/Client/Machines/Gpus/ByMachine/ByMachineRequestBuilder.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Machines.Gpus.ByMachine.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Marechai.App.Machines.Gpus.ByMachine +{ + /// + /// Builds and executes requests for operations under \machines\gpus\by-machine + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ByMachineRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.machines.gpus.byMachine.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Machines.Gpus.ByMachine.Item.WithMachineItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("machineId", position); + return new global::Marechai.App.Machines.Gpus.ByMachine.Item.WithMachineItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.machines.gpus.byMachine.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Machines.Gpus.ByMachine.Item.WithMachineItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("machineId", position); + return new global::Marechai.App.Machines.Gpus.ByMachine.Item.WithMachineItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ByMachineRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/gpus/by-machine", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ByMachineRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/gpus/by-machine", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Machines/Gpus/ByMachine/Item/WithMachineItemRequestBuilder.cs b/Marechai.App/Services/Client/Machines/Gpus/ByMachine/Item/WithMachineItemRequestBuilder.cs new file mode 100644 index 00000000..a8397acb --- /dev/null +++ b/Marechai.App/Services/Client/Machines/Gpus/ByMachine/Item/WithMachineItemRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Machines.Gpus.ByMachine.Item +{ + /// + /// Builds and executes requests for operations under \machines\gpus\by-machine\{machineId} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithMachineItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithMachineItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/gpus/by-machine/{machineId}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithMachineItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/gpus/by-machine/{machineId}", rawUrl) + { + } + /// A List<global::Marechai.App.Models.GpuByMachineDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.GpuByMachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Machines.Gpus.ByMachine.Item.WithMachineItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Machines.Gpus.ByMachine.Item.WithMachineItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithMachineItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Machines/Gpus/GpusRequestBuilder.cs b/Marechai.App/Services/Client/Machines/Gpus/GpusRequestBuilder.cs new file mode 100644 index 00000000..e59c5cc2 --- /dev/null +++ b/Marechai.App/Services/Client/Machines/Gpus/GpusRequestBuilder.cs @@ -0,0 +1,130 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Machines.Gpus.ByMachine; +using Marechai.App.Machines.Gpus.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Machines.Gpus +{ + /// + /// Builds and executes requests for operations under \machines\gpus + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GpusRequestBuilder : BaseRequestBuilder + { + /// The byMachine property + public global::Marechai.App.Machines.Gpus.ByMachine.ByMachineRequestBuilder ByMachine + { + get => new global::Marechai.App.Machines.Gpus.ByMachine.ByMachineRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Marechai.App.machines.gpus.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Machines.Gpus.Item.GpusItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Machines.Gpus.Item.GpusItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.machines.gpus.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Machines.Gpus.Item.GpusItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Machines.Gpus.Item.GpusItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GpusRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/gpus", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GpusRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/gpus", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.GpuByMachineDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.GpuByMachineDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.GpuByMachineDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.GpuByMachineDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Machines.Gpus.GpusRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Machines.Gpus.GpusRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GpusRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Machines/Gpus/Item/GpusItemRequestBuilder.cs b/Marechai.App/Services/Client/Machines/Gpus/Item/GpusItemRequestBuilder.cs new file mode 100644 index 00000000..1f1c01c1 --- /dev/null +++ b/Marechai.App/Services/Client/Machines/Gpus/Item/GpusItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Machines.Gpus.Item +{ + /// + /// Builds and executes requests for operations under \machines\gpus\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GpusItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GpusItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/gpus/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GpusItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/gpus/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Machines.Gpus.Item.GpusItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Machines.Gpus.Item.GpusItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GpusItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Machines/Item/Full/FullRequestBuilder.cs b/Marechai.App/Services/Client/Machines/Item/Full/FullRequestBuilder.cs new file mode 100644 index 00000000..9556f9ae --- /dev/null +++ b/Marechai.App/Services/Client/Machines/Item/Full/FullRequestBuilder.cs @@ -0,0 +1,91 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Machines.Item.Full +{ + /// + /// Builds and executes requests for operations under \machines\{-id}\full + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FullRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FullRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/{%2Did}/full", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FullRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/{%2Did}/full", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.MachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Machines.Item.Full.FullRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Machines.Item.Full.FullRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FullRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Machines/Item/Gpus/GpusRequestBuilder.cs b/Marechai.App/Services/Client/Machines/Item/Gpus/GpusRequestBuilder.cs new file mode 100644 index 00000000..b07d90a5 --- /dev/null +++ b/Marechai.App/Services/Client/Machines/Item/Gpus/GpusRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Machines.Item.Gpus +{ + /// + /// Builds and executes requests for operations under \machines\{-id}\gpus + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GpusRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GpusRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/{%2Did}/gpus", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GpusRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/{%2Did}/gpus", rawUrl) + { + } + /// A List<global::Marechai.App.Models.GpuDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.GpuDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Machines.Item.Gpus.GpusRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Machines.Item.Gpus.GpusRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GpusRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Machines/Item/ItemRequestBuilder.cs b/Marechai.App/Services/Client/Machines/Item/ItemRequestBuilder.cs new file mode 100644 index 00000000..6a984d70 --- /dev/null +++ b/Marechai.App/Services/Client/Machines/Item/ItemRequestBuilder.cs @@ -0,0 +1,240 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Machines.Item.Full; +using Marechai.App.Machines.Item.Gpus; +using Marechai.App.Machines.Item.Memories; +using Marechai.App.Machines.Item.Photos; +using Marechai.App.Machines.Item.Processors; +using Marechai.App.Machines.Item.Screens; +using Marechai.App.Machines.Item.SoundSynths; +using Marechai.App.Machines.Item.Storage; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Machines.Item +{ + /// + /// Builds and executes requests for operations under \machines\{-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilder : BaseRequestBuilder + { + /// The full property + public global::Marechai.App.Machines.Item.Full.FullRequestBuilder Full + { + get => new global::Marechai.App.Machines.Item.Full.FullRequestBuilder(PathParameters, RequestAdapter); + } + /// The gpus property + public global::Marechai.App.Machines.Item.Gpus.GpusRequestBuilder Gpus + { + get => new global::Marechai.App.Machines.Item.Gpus.GpusRequestBuilder(PathParameters, RequestAdapter); + } + /// The memories property + public global::Marechai.App.Machines.Item.Memories.MemoriesRequestBuilder Memories + { + get => new global::Marechai.App.Machines.Item.Memories.MemoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// The photos property + public global::Marechai.App.Machines.Item.Photos.PhotosRequestBuilder Photos + { + get => new global::Marechai.App.Machines.Item.Photos.PhotosRequestBuilder(PathParameters, RequestAdapter); + } + /// The processors property + public global::Marechai.App.Machines.Item.Processors.ProcessorsRequestBuilder Processors + { + get => new global::Marechai.App.Machines.Item.Processors.ProcessorsRequestBuilder(PathParameters, RequestAdapter); + } + /// The screens property + public global::Marechai.App.Machines.Item.Screens.ScreensRequestBuilder Screens + { + get => new global::Marechai.App.Machines.Item.Screens.ScreensRequestBuilder(PathParameters, RequestAdapter); + } + /// The soundSynths property + public global::Marechai.App.Machines.Item.SoundSynths.SoundSynthsRequestBuilder SoundSynths + { + get => new global::Marechai.App.Machines.Item.SoundSynths.SoundSynthsRequestBuilder(PathParameters, RequestAdapter); + } + /// The storage property + public global::Marechai.App.Machines.Item.Storage.StorageRequestBuilder Storage + { + get => new global::Marechai.App.Machines.Item.Storage.StorageRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/{%2Did}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/{%2Did}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.MachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.MachineDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.MachineDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.MachineDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.MachineDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Machines.Item.ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Machines.Item.ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Machines/Item/Memories/MemoriesRequestBuilder.cs b/Marechai.App/Services/Client/Machines/Item/Memories/MemoriesRequestBuilder.cs new file mode 100644 index 00000000..5915a48d --- /dev/null +++ b/Marechai.App/Services/Client/Machines/Item/Memories/MemoriesRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Machines.Item.Memories +{ + /// + /// Builds and executes requests for operations under \machines\{-id}\memories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MemoriesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MemoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/{%2Did}/memories", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MemoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/{%2Did}/memories", rawUrl) + { + } + /// A List<global::Marechai.App.Models.MemoryByMachineDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.MemoryByMachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Machines.Item.Memories.MemoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Machines.Item.Memories.MemoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MemoriesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Machines/Item/Photos/PhotosRequestBuilder.cs b/Marechai.App/Services/Client/Machines/Item/Photos/PhotosRequestBuilder.cs new file mode 100644 index 00000000..1d6b48fb --- /dev/null +++ b/Marechai.App/Services/Client/Machines/Item/Photos/PhotosRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Machines.Item.Photos +{ + /// + /// Builds and executes requests for operations under \machines\{-id}\photos + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PhotosRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PhotosRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/{%2Did}/photos", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PhotosRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/{%2Did}/photos", rawUrl) + { + } + /// A List<Guid> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendPrimitiveCollectionAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Machines.Item.Photos.PhotosRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Machines.Item.Photos.PhotosRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PhotosRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Machines/Item/Processors/ProcessorsRequestBuilder.cs b/Marechai.App/Services/Client/Machines/Item/Processors/ProcessorsRequestBuilder.cs new file mode 100644 index 00000000..adfab081 --- /dev/null +++ b/Marechai.App/Services/Client/Machines/Item/Processors/ProcessorsRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Machines.Item.Processors +{ + /// + /// Builds and executes requests for operations under \machines\{-id}\processors + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProcessorsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProcessorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/{%2Did}/processors", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProcessorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/{%2Did}/processors", rawUrl) + { + } + /// A List<global::Marechai.App.Models.ProcessorDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.ProcessorDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Machines.Item.Processors.ProcessorsRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Machines.Item.Processors.ProcessorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProcessorsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Machines/Item/Screens/ScreensRequestBuilder.cs b/Marechai.App/Services/Client/Machines/Item/Screens/ScreensRequestBuilder.cs new file mode 100644 index 00000000..19283f56 --- /dev/null +++ b/Marechai.App/Services/Client/Machines/Item/Screens/ScreensRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Machines.Item.Screens +{ + /// + /// Builds and executes requests for operations under \machines\{-id}\screens + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScreensRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScreensRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/{%2Did}/screens", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScreensRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/{%2Did}/screens", rawUrl) + { + } + /// A List<global::Marechai.App.Models.ScreenByMachineDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.ScreenByMachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Machines.Item.Screens.ScreensRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Machines.Item.Screens.ScreensRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScreensRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Machines/Item/SoundSynths/SoundSynthsRequestBuilder.cs b/Marechai.App/Services/Client/Machines/Item/SoundSynths/SoundSynthsRequestBuilder.cs new file mode 100644 index 00000000..9419ed4c --- /dev/null +++ b/Marechai.App/Services/Client/Machines/Item/SoundSynths/SoundSynthsRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Machines.Item.SoundSynths +{ + /// + /// Builds and executes requests for operations under \machines\{-id}\sound-synths + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SoundSynthsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SoundSynthsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/{%2Did}/sound-synths", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SoundSynthsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/{%2Did}/sound-synths", rawUrl) + { + } + /// A List<global::Marechai.App.Models.SoundSynthDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.SoundSynthDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Machines.Item.SoundSynths.SoundSynthsRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Machines.Item.SoundSynths.SoundSynthsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SoundSynthsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Machines/Item/Storage/StorageRequestBuilder.cs b/Marechai.App/Services/Client/Machines/Item/Storage/StorageRequestBuilder.cs new file mode 100644 index 00000000..d05a6ef5 --- /dev/null +++ b/Marechai.App/Services/Client/Machines/Item/Storage/StorageRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Machines.Item.Storage +{ + /// + /// Builds and executes requests for operations under \machines\{-id}\storage + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StorageRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StorageRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/{%2Did}/storage", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StorageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/{%2Did}/storage", rawUrl) + { + } + /// A List<global::Marechai.App.Models.StorageByMachineDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.StorageByMachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Machines.Item.Storage.StorageRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Machines.Item.Storage.StorageRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StorageRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Machines/MachinesRequestBuilder.cs b/Marechai.App/Services/Client/Machines/MachinesRequestBuilder.cs new file mode 100644 index 00000000..3d194911 --- /dev/null +++ b/Marechai.App/Services/Client/Machines/MachinesRequestBuilder.cs @@ -0,0 +1,193 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Machines.Books; +using Marechai.App.Machines.Documents; +using Marechai.App.Machines.Gpus; +using Marechai.App.Machines.Item; +using Marechai.App.Machines.Photos; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Machines +{ + /// + /// Builds and executes requests for operations under \machines + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinesRequestBuilder : BaseRequestBuilder + { + /// The books property + public global::Marechai.App.Machines.Books.BooksRequestBuilder Books + { + get => new global::Marechai.App.Machines.Books.BooksRequestBuilder(PathParameters, RequestAdapter); + } + /// The documents property + public global::Marechai.App.Machines.Documents.DocumentsRequestBuilder Documents + { + get => new global::Marechai.App.Machines.Documents.DocumentsRequestBuilder(PathParameters, RequestAdapter); + } + /// The gpus property + public global::Marechai.App.Machines.Gpus.GpusRequestBuilder Gpus + { + get => new global::Marechai.App.Machines.Gpus.GpusRequestBuilder(PathParameters, RequestAdapter); + } + /// The photos property + public global::Marechai.App.Machines.Photos.PhotosRequestBuilder Photos + { + get => new global::Marechai.App.Machines.Photos.PhotosRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Marechai.App.machines.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Machines.Item.ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("%2Did", position); + return new global::Marechai.App.Machines.Item.ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.machines.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Machines.Item.ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("%2Did", position); + return new global::Marechai.App.Machines.Item.ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MachinesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MachinesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines", rawUrl) + { + } + /// A List<global::Marechai.App.Models.MachineDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.MachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.MachineDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.MachineDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MachineDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MachineDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Machines.MachinesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Machines.MachinesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Machines/Photos/Item/PhotosItemRequestBuilder.cs b/Marechai.App/Services/Client/Machines/Photos/Item/PhotosItemRequestBuilder.cs new file mode 100644 index 00000000..8df8604f --- /dev/null +++ b/Marechai.App/Services/Client/Machines/Photos/Item/PhotosItemRequestBuilder.cs @@ -0,0 +1,144 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Machines.Photos.Item +{ + /// + /// Builds and executes requests for operations under \machines\photos\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PhotosItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PhotosItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/photos/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PhotosItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/photos/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.MachinePhotoDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.MachinePhotoDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.MachinePhotoDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.MachinePhotoDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.MachinePhotoDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Machines.Photos.Item.PhotosItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Machines.Photos.Item.PhotosItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PhotosItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PhotosItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Machines/Photos/PhotosRequestBuilder.cs b/Marechai.App/Services/Client/Machines/Photos/PhotosRequestBuilder.cs new file mode 100644 index 00000000..a0ad43fb --- /dev/null +++ b/Marechai.App/Services/Client/Machines/Photos/PhotosRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Machines.Photos.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Machines.Photos +{ + /// + /// Builds and executes requests for operations under \machines\photos + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PhotosRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.machines.photos.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Machines.Photos.Item.PhotosItemRequestBuilder this[Guid position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Machines.Photos.Item.PhotosItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.machines.photos.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Machines.Photos.Item.PhotosItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Machines.Photos.Item.PhotosItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PhotosRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/photos", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PhotosRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/photos", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.MachinePhotoDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.MachinePhotoDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MachinePhotoDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MachinePhotoDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Machines.Photos.PhotosRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Machines.Photos.PhotosRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PhotosRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Magazines/Companies/CompaniesRequestBuilder.cs b/Marechai.App/Services/Client/Magazines/Companies/CompaniesRequestBuilder.cs new file mode 100644 index 00000000..d0b20d82 --- /dev/null +++ b/Marechai.App/Services/Client/Magazines/Companies/CompaniesRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Magazines.Companies.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Magazines.Companies +{ + /// + /// Builds and executes requests for operations under \magazines\companies + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.magazines.companies.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Magazines.Companies.Item.CompaniesItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Magazines.Companies.Item.CompaniesItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.magazines.companies.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Magazines.Companies.Item.CompaniesItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Magazines.Companies.Item.CompaniesItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/companies", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/companies", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.CompanyByMagazineDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.CompanyByMagazineDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyByMagazineDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyByMagazineDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Magazines.Companies.CompaniesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Magazines.Companies.CompaniesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Magazines/Companies/Item/CompaniesItemRequestBuilder.cs b/Marechai.App/Services/Client/Magazines/Companies/Item/CompaniesItemRequestBuilder.cs new file mode 100644 index 00000000..9fdaa6b1 --- /dev/null +++ b/Marechai.App/Services/Client/Magazines/Companies/Item/CompaniesItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Magazines.Companies.Item +{ + /// + /// Builds and executes requests for operations under \magazines\companies\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompaniesItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/companies/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompaniesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/companies/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Magazines.Companies.Item.CompaniesItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Magazines.Companies.Item.CompaniesItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Magazines/Issues/IssuesRequestBuilder.cs b/Marechai.App/Services/Client/Magazines/Issues/IssuesRequestBuilder.cs new file mode 100644 index 00000000..ac1b0f86 --- /dev/null +++ b/Marechai.App/Services/Client/Magazines/Issues/IssuesRequestBuilder.cs @@ -0,0 +1,169 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Magazines.Issues.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Magazines.Issues +{ + /// + /// Builds and executes requests for operations under \magazines\issues + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.magazines.issues.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Magazines.Issues.Item.IssuesItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Magazines.Issues.Item.IssuesItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.magazines.issues.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Magazines.Issues.Item.IssuesItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Magazines.Issues.Item.IssuesItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IssuesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/issues", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IssuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/issues", rawUrl) + { + } + /// A List<global::Marechai.App.Models.MagazineIssueDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.MagazineIssueDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.MagazineIssueDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.MagazineIssueDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MagazineIssueDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MagazineIssueDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Magazines.Issues.IssuesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Magazines.Issues.IssuesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Magazines/Issues/Item/IssuesItemRequestBuilder.cs b/Marechai.App/Services/Client/Magazines/Issues/Item/IssuesItemRequestBuilder.cs new file mode 100644 index 00000000..31e1374e --- /dev/null +++ b/Marechai.App/Services/Client/Magazines/Issues/Item/IssuesItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Magazines.Issues.Item +{ + /// + /// Builds and executes requests for operations under \magazines\issues\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IssuesItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/issues/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IssuesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/issues/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.MagazineIssueDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.MagazineIssueDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.MagazineIssueDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.MagazineIssueDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.MagazineIssueDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Magazines.Issues.Item.IssuesItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Magazines.Issues.Item.IssuesItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class IssuesItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Magazines/Item/Companies/CompaniesRequestBuilder.cs b/Marechai.App/Services/Client/Magazines/Item/Companies/CompaniesRequestBuilder.cs new file mode 100644 index 00000000..3dc0fbb6 --- /dev/null +++ b/Marechai.App/Services/Client/Magazines/Item/Companies/CompaniesRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Magazines.Item.Companies +{ + /// + /// Builds and executes requests for operations under \magazines\{-id}\companies + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/{%2Did}/companies", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/{%2Did}/companies", rawUrl) + { + } + /// A List<global::Marechai.App.Models.CompanyByMagazineDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.CompanyByMagazineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Magazines.Item.Companies.CompaniesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Magazines.Item.Companies.CompaniesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Magazines/Item/ItemRequestBuilder.cs b/Marechai.App/Services/Client/Magazines/Item/ItemRequestBuilder.cs new file mode 100644 index 00000000..d694d84c --- /dev/null +++ b/Marechai.App/Services/Client/Magazines/Item/ItemRequestBuilder.cs @@ -0,0 +1,228 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Magazines.Item.Companies; +using Marechai.App.Magazines.Item.MachineFamilies; +using Marechai.App.Magazines.Item.Machines; +using Marechai.App.Magazines.Item.People; +using Marechai.App.Magazines.Item.Scans; +using Marechai.App.Magazines.Item.Synopsis; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Magazines.Item +{ + /// + /// Builds and executes requests for operations under \magazines\{-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilder : BaseRequestBuilder + { + /// The companies property + public global::Marechai.App.Magazines.Item.Companies.CompaniesRequestBuilder Companies + { + get => new global::Marechai.App.Magazines.Item.Companies.CompaniesRequestBuilder(PathParameters, RequestAdapter); + } + /// The machineFamilies property + public global::Marechai.App.Magazines.Item.MachineFamilies.MachineFamiliesRequestBuilder MachineFamilies + { + get => new global::Marechai.App.Magazines.Item.MachineFamilies.MachineFamiliesRequestBuilder(PathParameters, RequestAdapter); + } + /// The machines property + public global::Marechai.App.Magazines.Item.Machines.MachinesRequestBuilder Machines + { + get => new global::Marechai.App.Magazines.Item.Machines.MachinesRequestBuilder(PathParameters, RequestAdapter); + } + /// The people property + public global::Marechai.App.Magazines.Item.People.PeopleRequestBuilder People + { + get => new global::Marechai.App.Magazines.Item.People.PeopleRequestBuilder(PathParameters, RequestAdapter); + } + /// The scans property + public global::Marechai.App.Magazines.Item.Scans.ScansRequestBuilder Scans + { + get => new global::Marechai.App.Magazines.Item.Scans.ScansRequestBuilder(PathParameters, RequestAdapter); + } + /// The synopsis property + public global::Marechai.App.Magazines.Item.Synopsis.SynopsisRequestBuilder Synopsis + { + get => new global::Marechai.App.Magazines.Item.Synopsis.SynopsisRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/{%2Did}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/{%2Did}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.MagazineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.MagazineDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.MagazineDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.MagazineDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.MagazineDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Magazines.Item.ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Magazines.Item.ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Magazines/Item/MachineFamilies/MachineFamiliesRequestBuilder.cs b/Marechai.App/Services/Client/Magazines/Item/MachineFamilies/MachineFamiliesRequestBuilder.cs new file mode 100644 index 00000000..fbb034f5 --- /dev/null +++ b/Marechai.App/Services/Client/Magazines/Item/MachineFamilies/MachineFamiliesRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Magazines.Item.MachineFamilies +{ + /// + /// Builds and executes requests for operations under \magazines\{-id}\machine-families + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachineFamiliesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MachineFamiliesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/{%2Did}/machine-families", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MachineFamiliesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/{%2Did}/machine-families", rawUrl) + { + } + /// A List<global::Marechai.App.Models.MagazineByMachineFamilyDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.MagazineByMachineFamilyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Magazines.Item.MachineFamilies.MachineFamiliesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Magazines.Item.MachineFamilies.MachineFamiliesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachineFamiliesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Magazines/Item/Machines/MachinesRequestBuilder.cs b/Marechai.App/Services/Client/Magazines/Item/Machines/MachinesRequestBuilder.cs new file mode 100644 index 00000000..df272ec6 --- /dev/null +++ b/Marechai.App/Services/Client/Magazines/Item/Machines/MachinesRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Magazines.Item.Machines +{ + /// + /// Builds and executes requests for operations under \magazines\{-id}\machines + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MachinesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/{%2Did}/machines", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MachinesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/{%2Did}/machines", rawUrl) + { + } + /// A List<global::Marechai.App.Models.MagazineByMachineDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.MagazineByMachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Magazines.Item.Machines.MachinesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Magazines.Item.Machines.MachinesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Magazines/Item/People/PeopleRequestBuilder.cs b/Marechai.App/Services/Client/Magazines/Item/People/PeopleRequestBuilder.cs new file mode 100644 index 00000000..0c679f80 --- /dev/null +++ b/Marechai.App/Services/Client/Magazines/Item/People/PeopleRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Magazines.Item.People +{ + /// + /// Builds and executes requests for operations under \magazines\{-id}\people + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PeopleRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/{%2Did}/people", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PeopleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/{%2Did}/people", rawUrl) + { + } + /// A List<global::Marechai.App.Models.PersonByMagazineDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.PersonByMagazineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Magazines.Item.People.PeopleRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Magazines.Item.People.PeopleRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Magazines/Item/Scans/ScansRequestBuilder.cs b/Marechai.App/Services/Client/Magazines/Item/Scans/ScansRequestBuilder.cs new file mode 100644 index 00000000..3871f2cd --- /dev/null +++ b/Marechai.App/Services/Client/Magazines/Item/Scans/ScansRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Magazines.Item.Scans +{ + /// + /// Builds and executes requests for operations under \magazines\{-id}\scans + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScansRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/{%2Did}/scans", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScansRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/{%2Did}/scans", rawUrl) + { + } + /// A List<Guid> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendPrimitiveCollectionAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Magazines.Item.Scans.ScansRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Magazines.Item.Scans.ScansRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Magazines/Item/Synopsis/SynopsisRequestBuilder.cs b/Marechai.App/Services/Client/Magazines/Item/Synopsis/SynopsisRequestBuilder.cs new file mode 100644 index 00000000..0bca9a64 --- /dev/null +++ b/Marechai.App/Services/Client/Magazines/Item/Synopsis/SynopsisRequestBuilder.cs @@ -0,0 +1,91 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Magazines.Item.Synopsis +{ + /// + /// Builds and executes requests for operations under \magazines\{-id}\synopsis + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SynopsisRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SynopsisRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/{%2Did}/synopsis", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SynopsisRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/{%2Did}/synopsis", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Magazines.Item.Synopsis.SynopsisRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Magazines.Item.Synopsis.SynopsisRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SynopsisRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Magazines/MagazinesRequestBuilder.cs b/Marechai.App/Services/Client/Magazines/MagazinesRequestBuilder.cs new file mode 100644 index 00000000..42d82d42 --- /dev/null +++ b/Marechai.App/Services/Client/Magazines/MagazinesRequestBuilder.cs @@ -0,0 +1,193 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Magazines.Companies; +using Marechai.App.Magazines.Issues; +using Marechai.App.Magazines.Item; +using Marechai.App.Magazines.Scans; +using Marechai.App.Magazines.Titles; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Magazines +{ + /// + /// Builds and executes requests for operations under \magazines + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MagazinesRequestBuilder : BaseRequestBuilder + { + /// The companies property + public global::Marechai.App.Magazines.Companies.CompaniesRequestBuilder Companies + { + get => new global::Marechai.App.Magazines.Companies.CompaniesRequestBuilder(PathParameters, RequestAdapter); + } + /// The issues property + public global::Marechai.App.Magazines.Issues.IssuesRequestBuilder Issues + { + get => new global::Marechai.App.Magazines.Issues.IssuesRequestBuilder(PathParameters, RequestAdapter); + } + /// The scans property + public global::Marechai.App.Magazines.Scans.ScansRequestBuilder Scans + { + get => new global::Marechai.App.Magazines.Scans.ScansRequestBuilder(PathParameters, RequestAdapter); + } + /// The titles property + public global::Marechai.App.Magazines.Titles.TitlesRequestBuilder Titles + { + get => new global::Marechai.App.Magazines.Titles.TitlesRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Marechai.App.magazines.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Magazines.Item.ItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("%2Did", position); + return new global::Marechai.App.Magazines.Item.ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.magazines.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Magazines.Item.ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("%2Did", position); + return new global::Marechai.App.Magazines.Item.ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MagazinesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MagazinesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines", rawUrl) + { + } + /// A List<global::Marechai.App.Models.MagazineDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.MagazineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.MagazineDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.MagazineDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MagazineDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MagazineDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Magazines.MagazinesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Magazines.MagazinesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MagazinesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MagazinesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Magazines/Scans/Item/ScansItemRequestBuilder.cs b/Marechai.App/Services/Client/Magazines/Scans/Item/ScansItemRequestBuilder.cs new file mode 100644 index 00000000..9a55fe4a --- /dev/null +++ b/Marechai.App/Services/Client/Magazines/Scans/Item/ScansItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Magazines.Scans.Item +{ + /// + /// Builds and executes requests for operations under \magazines\scans\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScansItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/scans/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScansItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/scans/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.MagazineScanDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.MagazineScanDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.MagazineScanDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.MagazineScanDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.MagazineScanDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Magazines.Scans.Item.ScansItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Magazines.Scans.Item.ScansItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Magazines/Scans/ScansRequestBuilder.cs b/Marechai.App/Services/Client/Magazines/Scans/ScansRequestBuilder.cs new file mode 100644 index 00000000..80994ccd --- /dev/null +++ b/Marechai.App/Services/Client/Magazines/Scans/ScansRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Magazines.Scans.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Magazines.Scans +{ + /// + /// Builds and executes requests for operations under \magazines\scans + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.magazines.scans.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Magazines.Scans.Item.ScansItemRequestBuilder this[Guid position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Magazines.Scans.Item.ScansItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.magazines.scans.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Magazines.Scans.Item.ScansItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Magazines.Scans.Item.ScansItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScansRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/scans", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScansRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/scans", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.MagazineScanDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.MagazineScanDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MagazineScanDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MagazineScanDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Magazines.Scans.ScansRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Magazines.Scans.ScansRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScansRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Magazines/Titles/TitlesRequestBuilder.cs b/Marechai.App/Services/Client/Magazines/Titles/TitlesRequestBuilder.cs new file mode 100644 index 00000000..ec999780 --- /dev/null +++ b/Marechai.App/Services/Client/Magazines/Titles/TitlesRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Magazines.Titles +{ + /// + /// Builds and executes requests for operations under \magazines\titles + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TitlesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TitlesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/titles", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TitlesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines/titles", rawUrl) + { + } + /// A List<global::Marechai.App.Models.MagazineDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.MagazineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Magazines.Titles.TitlesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Magazines.Titles.TitlesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TitlesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/MagazinesByMachine/Item/MagazinesByMachineItemRequestBuilder.cs b/Marechai.App/Services/Client/MagazinesByMachine/Item/MagazinesByMachineItemRequestBuilder.cs new file mode 100644 index 00000000..8e372733 --- /dev/null +++ b/Marechai.App/Services/Client/MagazinesByMachine/Item/MagazinesByMachineItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.MagazinesByMachine.Item +{ + /// + /// Builds and executes requests for operations under \magazines-by-machine\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MagazinesByMachineItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MagazinesByMachineItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines-by-machine/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MagazinesByMachineItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines-by-machine/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.MagazinesByMachine.Item.MagazinesByMachineItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.MagazinesByMachine.Item.MagazinesByMachineItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MagazinesByMachineItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/MagazinesByMachine/MagazinesByMachineRequestBuilder.cs b/Marechai.App/Services/Client/MagazinesByMachine/MagazinesByMachineRequestBuilder.cs new file mode 100644 index 00000000..2ebc0bc4 --- /dev/null +++ b/Marechai.App/Services/Client/MagazinesByMachine/MagazinesByMachineRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Marechai.App.MagazinesByMachine.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.MagazinesByMachine +{ + /// + /// Builds and executes requests for operations under \magazines-by-machine + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MagazinesByMachineRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.magazinesByMachine.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.MagazinesByMachine.Item.MagazinesByMachineItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.MagazinesByMachine.Item.MagazinesByMachineItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.magazinesByMachine.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.MagazinesByMachine.Item.MagazinesByMachineItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.MagazinesByMachine.Item.MagazinesByMachineItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MagazinesByMachineRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines-by-machine", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MagazinesByMachineRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines-by-machine", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.MagazineByMachineDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.MagazineByMachineDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MagazineByMachineDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MagazineByMachineDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.MagazinesByMachine.MagazinesByMachineRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.MagazinesByMachine.MagazinesByMachineRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MagazinesByMachineRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/MagazinesByMachineFamily/Item/MagazinesByMachineFamilyItemRequestBuilder.cs b/Marechai.App/Services/Client/MagazinesByMachineFamily/Item/MagazinesByMachineFamilyItemRequestBuilder.cs new file mode 100644 index 00000000..c099e32f --- /dev/null +++ b/Marechai.App/Services/Client/MagazinesByMachineFamily/Item/MagazinesByMachineFamilyItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.MagazinesByMachineFamily.Item +{ + /// + /// Builds and executes requests for operations under \magazines-by-machine-family\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MagazinesByMachineFamilyItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MagazinesByMachineFamilyItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines-by-machine-family/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MagazinesByMachineFamilyItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines-by-machine-family/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.MagazinesByMachineFamily.Item.MagazinesByMachineFamilyItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.MagazinesByMachineFamily.Item.MagazinesByMachineFamilyItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MagazinesByMachineFamilyItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/MagazinesByMachineFamily/MagazinesByMachineFamilyRequestBuilder.cs b/Marechai.App/Services/Client/MagazinesByMachineFamily/MagazinesByMachineFamilyRequestBuilder.cs new file mode 100644 index 00000000..941374be --- /dev/null +++ b/Marechai.App/Services/Client/MagazinesByMachineFamily/MagazinesByMachineFamilyRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Marechai.App.MagazinesByMachineFamily.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.MagazinesByMachineFamily +{ + /// + /// Builds and executes requests for operations under \magazines-by-machine-family + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MagazinesByMachineFamilyRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.magazinesByMachineFamily.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.MagazinesByMachineFamily.Item.MagazinesByMachineFamilyItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.MagazinesByMachineFamily.Item.MagazinesByMachineFamilyItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.magazinesByMachineFamily.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.MagazinesByMachineFamily.Item.MagazinesByMachineFamilyItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.MagazinesByMachineFamily.Item.MagazinesByMachineFamilyItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MagazinesByMachineFamilyRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines-by-machine-family", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MagazinesByMachineFamilyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/magazines-by-machine-family", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.MagazineByMachineFamilyDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.MagazineByMachineFamilyDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MagazineByMachineFamilyDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MagazineByMachineFamilyDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.MagazinesByMachineFamily.MagazinesByMachineFamilyRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.MagazinesByMachineFamily.MagazinesByMachineFamilyRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MagazinesByMachineFamilyRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/MaximumYear/MaximumYearRequestBuilder.cs b/Marechai.App/Services/Client/MaximumYear/MaximumYearRequestBuilder.cs new file mode 100644 index 00000000..0798b325 --- /dev/null +++ b/Marechai.App/Services/Client/MaximumYear/MaximumYearRequestBuilder.cs @@ -0,0 +1,91 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.MaximumYear +{ + /// + /// Builds and executes requests for operations under \maximum-year + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MaximumYearRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MaximumYearRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/maximum-year", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MaximumYearRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/maximum-year", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.MaximumYear.MaximumYearRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.MaximumYear.MaximumYearRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MaximumYearRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Medias/Item/MediasItemRequestBuilder.cs b/Marechai.App/Services/Client/Medias/Item/MediasItemRequestBuilder.cs new file mode 100644 index 00000000..06d6afbe --- /dev/null +++ b/Marechai.App/Services/Client/Medias/Item/MediasItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Medias.Item +{ + /// + /// Builds and executes requests for operations under \medias\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MediasItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MediasItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/medias/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MediasItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/medias/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.MediaDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.MediaDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.MediaDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.MediaDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.MediaDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Medias.Item.MediasItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Medias.Item.MediasItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MediasItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MediasItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MediasItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Medias/MediasRequestBuilder.cs b/Marechai.App/Services/Client/Medias/MediasRequestBuilder.cs new file mode 100644 index 00000000..56443387 --- /dev/null +++ b/Marechai.App/Services/Client/Medias/MediasRequestBuilder.cs @@ -0,0 +1,162 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Medias.Item; +using Marechai.App.Medias.Titles; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Medias +{ + /// + /// Builds and executes requests for operations under \medias + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MediasRequestBuilder : BaseRequestBuilder + { + /// The titles property + public global::Marechai.App.Medias.Titles.TitlesRequestBuilder Titles + { + get => new global::Marechai.App.Medias.Titles.TitlesRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Marechai.App.medias.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Medias.Item.MediasItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Medias.Item.MediasItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MediasRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/medias", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MediasRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/medias", rawUrl) + { + } + /// A List<global::Marechai.App.Models.MediaDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.MediaDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.MediaDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.MediaDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MediaDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MediaDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Medias.MediasRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Medias.MediasRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MediasRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MediasRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Medias/Titles/TitlesRequestBuilder.cs b/Marechai.App/Services/Client/Medias/Titles/TitlesRequestBuilder.cs new file mode 100644 index 00000000..e22af6c8 --- /dev/null +++ b/Marechai.App/Services/Client/Medias/Titles/TitlesRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Medias.Titles +{ + /// + /// Builds and executes requests for operations under \medias\titles + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TitlesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TitlesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/medias/titles", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TitlesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/medias/titles", rawUrl) + { + } + /// A List<global::Marechai.App.Models.MediaDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.MediaDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Medias.Titles.TitlesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Medias.Titles.TitlesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TitlesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/MemoriesByMachine/Item/MemoriesByMachineItemRequestBuilder.cs b/Marechai.App/Services/Client/MemoriesByMachine/Item/MemoriesByMachineItemRequestBuilder.cs new file mode 100644 index 00000000..0a5bdbb8 --- /dev/null +++ b/Marechai.App/Services/Client/MemoriesByMachine/Item/MemoriesByMachineItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.MemoriesByMachine.Item +{ + /// + /// Builds and executes requests for operations under \memories-by-machine\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MemoriesByMachineItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MemoriesByMachineItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/memories-by-machine/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MemoriesByMachineItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/memories-by-machine/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.MemoriesByMachine.Item.MemoriesByMachineItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.MemoriesByMachine.Item.MemoriesByMachineItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MemoriesByMachineItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/MemoriesByMachine/MemoriesByMachineRequestBuilder.cs b/Marechai.App/Services/Client/MemoriesByMachine/MemoriesByMachineRequestBuilder.cs new file mode 100644 index 00000000..5b86c58d --- /dev/null +++ b/Marechai.App/Services/Client/MemoriesByMachine/MemoriesByMachineRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Marechai.App.MemoriesByMachine.Item; +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.MemoriesByMachine +{ + /// + /// Builds and executes requests for operations under \memories-by-machine + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MemoriesByMachineRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.memoriesByMachine.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.MemoriesByMachine.Item.MemoriesByMachineItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.MemoriesByMachine.Item.MemoriesByMachineItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.memoriesByMachine.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.MemoriesByMachine.Item.MemoriesByMachineItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.MemoriesByMachine.Item.MemoriesByMachineItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MemoriesByMachineRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/memories-by-machine", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MemoriesByMachineRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/memories-by-machine", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.MemoryByMachineDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.MemoryByMachineDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MemoryByMachineDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MemoryByMachineDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.MemoriesByMachine.MemoriesByMachineRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.MemoriesByMachine.MemoriesByMachineRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MemoriesByMachineRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/MinimumYear/MinimumYearRequestBuilder.cs b/Marechai.App/Services/Client/MinimumYear/MinimumYearRequestBuilder.cs new file mode 100644 index 00000000..a316ec60 --- /dev/null +++ b/Marechai.App/Services/Client/MinimumYear/MinimumYearRequestBuilder.cs @@ -0,0 +1,91 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.MinimumYear +{ + /// + /// Builds and executes requests for operations under \minimum-year + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MinimumYearRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public MinimumYearRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/minimum-year", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public MinimumYearRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/minimum-year", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.MinimumYear.MinimumYearRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.MinimumYear.MinimumYearRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MinimumYearRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/AuthRequest.cs b/Marechai.App/Services/Client/Models/AuthRequest.cs new file mode 100644 index 00000000..04f87094 --- /dev/null +++ b/Marechai.App/Services/Client/Models/AuthRequest.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AuthRequest : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The email property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Email { get; set; } +#nullable restore +#else + public string Email { get; set; } +#endif + /// The password property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Password { get; set; } +#nullable restore +#else + public string Password { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AuthRequest() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.AuthRequest CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.AuthRequest(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "email", n => { Email = n.GetStringValue(); } }, + { "password", n => { Password = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("email", Email); + writer.WriteStringValue("password", Password); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/AuthResponse.cs b/Marechai.App/Services/Client/Models/AuthResponse.cs new file mode 100644 index 00000000..76fffb37 --- /dev/null +++ b/Marechai.App/Services/Client/Models/AuthResponse.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AuthResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The succeeded property + public bool? Succeeded { get; set; } + /// The token property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Token { get; set; } +#nullable restore +#else + public string Token { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AuthResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.AuthResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.AuthResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "message", n => { Message = n.GetStringValue(); } }, + { "succeeded", n => { Succeeded = n.GetBoolValue(); } }, + { "token", n => { Token = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("message", Message); + writer.WriteBoolValue("succeeded", Succeeded); + writer.WriteStringValue("token", Token); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/BookByMachineDto.cs b/Marechai.App/Services/Client/Models/BookByMachineDto.cs new file mode 100644 index 00000000..cc8f13d3 --- /dev/null +++ b/Marechai.App/Services/Client/Models/BookByMachineDto.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BookByMachineDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The book property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Book { get; set; } +#nullable restore +#else + public string Book { get; set; } +#endif + /// The book_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? BookId { get; set; } +#nullable restore +#else + public UntypedNode BookId { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The machine property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Machine { get; set; } +#nullable restore +#else + public string Machine { get; set; } +#endif + /// The machine_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MachineId { get; set; } +#nullable restore +#else + public UntypedNode MachineId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BookByMachineDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.BookByMachineDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.BookByMachineDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "book", n => { Book = n.GetStringValue(); } }, + { "book_id", n => { BookId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "machine", n => { Machine = n.GetStringValue(); } }, + { "machine_id", n => { MachineId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("book", Book); + writer.WriteObjectValue("book_id", BookId); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("machine", Machine); + writer.WriteObjectValue("machine_id", MachineId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/BookByMachineFamilyDto.cs b/Marechai.App/Services/Client/Models/BookByMachineFamilyDto.cs new file mode 100644 index 00000000..46e318dc --- /dev/null +++ b/Marechai.App/Services/Client/Models/BookByMachineFamilyDto.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BookByMachineFamilyDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The book property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Book { get; set; } +#nullable restore +#else + public string Book { get; set; } +#endif + /// The book_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? BookId { get; set; } +#nullable restore +#else + public UntypedNode BookId { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The machine_family property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MachineFamily { get; set; } +#nullable restore +#else + public string MachineFamily { get; set; } +#endif + /// The machine_family_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MachineFamilyId { get; set; } +#nullable restore +#else + public UntypedNode MachineFamilyId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BookByMachineFamilyDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.BookByMachineFamilyDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.BookByMachineFamilyDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "book", n => { Book = n.GetStringValue(); } }, + { "book_id", n => { BookId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "machine_family", n => { MachineFamily = n.GetStringValue(); } }, + { "machine_family_id", n => { MachineFamilyId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("book", Book); + writer.WriteObjectValue("book_id", BookId); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("machine_family", MachineFamily); + writer.WriteObjectValue("machine_family_id", MachineFamilyId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/BookDto.cs b/Marechai.App/Services/Client/Models/BookDto.cs new file mode 100644 index 00000000..4e6a998c --- /dev/null +++ b/Marechai.App/Services/Client/Models/BookDto.cs @@ -0,0 +1,169 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BookDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The country property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Country { get; set; } +#nullable restore +#else + public string Country { get; set; } +#endif + /// The country_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? CountryId { get; set; } +#nullable restore +#else + public UntypedNode CountryId { get; set; } +#endif + /// The edition property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Edition { get; set; } +#nullable restore +#else + public UntypedNode Edition { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The isbn property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Isbn { get; set; } +#nullable restore +#else + public string Isbn { get; set; } +#endif + /// The native_title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NativeTitle { get; set; } +#nullable restore +#else + public string NativeTitle { get; set; } +#endif + /// The pages property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Pages { get; set; } +#nullable restore +#else + public UntypedNode Pages { get; set; } +#endif + /// The previous_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? PreviousId { get; set; } +#nullable restore +#else + public UntypedNode PreviousId { get; set; } +#endif + /// The published property + public DateTimeOffset? Published { get; set; } + /// The source_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? SourceId { get; set; } +#nullable restore +#else + public UntypedNode SourceId { get; set; } +#endif + /// The synopsis property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Synopsis { get; set; } +#nullable restore +#else + public string Synopsis { get; set; } +#endif + /// The title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BookDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.BookDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.BookDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "country", n => { Country = n.GetStringValue(); } }, + { "country_id", n => { CountryId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "edition", n => { Edition = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "isbn", n => { Isbn = n.GetStringValue(); } }, + { "native_title", n => { NativeTitle = n.GetStringValue(); } }, + { "pages", n => { Pages = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "previous_id", n => { PreviousId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "published", n => { Published = n.GetDateTimeOffsetValue(); } }, + { "source_id", n => { SourceId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "synopsis", n => { Synopsis = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("country", Country); + writer.WriteObjectValue("country_id", CountryId); + writer.WriteObjectValue("edition", Edition); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("isbn", Isbn); + writer.WriteStringValue("native_title", NativeTitle); + writer.WriteObjectValue("pages", Pages); + writer.WriteObjectValue("previous_id", PreviousId); + writer.WriteDateTimeOffsetValue("published", Published); + writer.WriteObjectValue("source_id", SourceId); + writer.WriteStringValue("synopsis", Synopsis); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/BookScanDto.cs b/Marechai.App/Services/Client/Models/BookScanDto.cs new file mode 100644 index 00000000..cbe88d21 --- /dev/null +++ b/Marechai.App/Services/Client/Models/BookScanDto.cs @@ -0,0 +1,371 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BookScanDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The author property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Author { get; set; } +#nullable restore +#else + public string Author { get; set; } +#endif + /// The book property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Book { get; set; } +#nullable restore +#else + public string Book { get; set; } +#endif + /// The book_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? BookId { get; set; } +#nullable restore +#else + public UntypedNode BookId { get; set; } +#endif + /// The colorspace property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.BookScanDto.BookScanDto_colorspace? Colorspace { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.BookScanDto.BookScanDto_colorspace Colorspace { get; set; } +#endif + /// The comments property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Comments { get; set; } +#nullable restore +#else + public string Comments { get; set; } +#endif + /// The creation_date property + public DateTimeOffset? CreationDate { get; set; } + /// The exif_version property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ExifVersion { get; set; } +#nullable restore +#else + public string ExifVersion { get; set; } +#endif + /// The horizontal_resolution property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? HorizontalResolution { get; set; } +#nullable restore +#else + public UntypedNode HorizontalResolution { get; set; } +#endif + /// The id property + public Guid? Id { get; set; } + /// The original_extension property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OriginalExtension { get; set; } +#nullable restore +#else + public string OriginalExtension { get; set; } +#endif + /// The page property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Page { get; set; } +#nullable restore +#else + public UntypedNode Page { get; set; } +#endif + /// The resolution_unit property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.BookScanDto.BookScanDto_resolution_unit? ResolutionUnit { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.BookScanDto.BookScanDto_resolution_unit ResolutionUnit { get; set; } +#endif + /// The scanner_manufacturer property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ScannerManufacturer { get; set; } +#nullable restore +#else + public string ScannerManufacturer { get; set; } +#endif + /// The scanner_model property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ScannerModel { get; set; } +#nullable restore +#else + public string ScannerModel { get; set; } +#endif + /// The software property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Software { get; set; } +#nullable restore +#else + public string Software { get; set; } +#endif + /// The type property + public int? Type { get; set; } + /// The upload_date property + public DateTimeOffset? UploadDate { get; set; } + /// The user_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserId { get; set; } +#nullable restore +#else + public string UserId { get; set; } +#endif + /// The vertical_resolution property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? VerticalResolution { get; set; } +#nullable restore +#else + public UntypedNode VerticalResolution { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BookScanDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.BookScanDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.BookScanDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author", n => { Author = n.GetStringValue(); } }, + { "book", n => { Book = n.GetStringValue(); } }, + { "book_id", n => { BookId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "colorspace", n => { Colorspace = n.GetObjectValue(global::Marechai.App.Models.BookScanDto.BookScanDto_colorspace.CreateFromDiscriminatorValue); } }, + { "comments", n => { Comments = n.GetStringValue(); } }, + { "creation_date", n => { CreationDate = n.GetDateTimeOffsetValue(); } }, + { "exif_version", n => { ExifVersion = n.GetStringValue(); } }, + { "horizontal_resolution", n => { HorizontalResolution = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetGuidValue(); } }, + { "original_extension", n => { OriginalExtension = n.GetStringValue(); } }, + { "page", n => { Page = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "resolution_unit", n => { ResolutionUnit = n.GetObjectValue(global::Marechai.App.Models.BookScanDto.BookScanDto_resolution_unit.CreateFromDiscriminatorValue); } }, + { "scanner_manufacturer", n => { ScannerManufacturer = n.GetStringValue(); } }, + { "scanner_model", n => { ScannerModel = n.GetStringValue(); } }, + { "software", n => { Software = n.GetStringValue(); } }, + { "type", n => { Type = n.GetIntValue(); } }, + { "upload_date", n => { UploadDate = n.GetDateTimeOffsetValue(); } }, + { "user_id", n => { UserId = n.GetStringValue(); } }, + { "vertical_resolution", n => { VerticalResolution = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("author", Author); + writer.WriteStringValue("book", Book); + writer.WriteObjectValue("book_id", BookId); + writer.WriteObjectValue("colorspace", Colorspace); + writer.WriteStringValue("comments", Comments); + writer.WriteDateTimeOffsetValue("creation_date", CreationDate); + writer.WriteStringValue("exif_version", ExifVersion); + writer.WriteObjectValue("horizontal_resolution", HorizontalResolution); + writer.WriteGuidValue("id", Id); + writer.WriteStringValue("original_extension", OriginalExtension); + writer.WriteObjectValue("page", Page); + writer.WriteObjectValue("resolution_unit", ResolutionUnit); + writer.WriteStringValue("scanner_manufacturer", ScannerManufacturer); + writer.WriteStringValue("scanner_model", ScannerModel); + writer.WriteStringValue("software", Software); + writer.WriteIntValue("type", Type); + writer.WriteDateTimeOffsetValue("upload_date", UploadDate); + writer.WriteStringValue("user_id", UserId); + writer.WriteObjectValue("vertical_resolution", VerticalResolution); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BookScanDto_colorspace : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.BookScanDto_colorspaceMember1? BookScanDtoColorspaceMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.BookScanDto_colorspaceMember1 BookScanDtoColorspaceMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ColorSpace? ColorSpace { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ColorSpace ColorSpace { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.BookScanDto.BookScanDto_colorspace CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.BookScanDto.BookScanDto_colorspace(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.BookScanDtoColorspaceMember1 = new global::Marechai.App.Models.BookScanDto_colorspaceMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ColorSpace = new global::Marechai.App.Models.ColorSpace(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(BookScanDtoColorspaceMember1 != null) + { + return BookScanDtoColorspaceMember1.GetFieldDeserializers(); + } + else if(ColorSpace != null) + { + return ColorSpace.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(BookScanDtoColorspaceMember1 != null) + { + writer.WriteObjectValue(null, BookScanDtoColorspaceMember1); + } + else if(ColorSpace != null) + { + writer.WriteObjectValue(null, ColorSpace); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class BookScanDto_resolution_unit : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.BookScanDto_resolution_unitMember1? BookScanDtoResolutionUnitMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.BookScanDto_resolution_unitMember1 BookScanDtoResolutionUnitMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ResolutionUnit? ResolutionUnit { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ResolutionUnit ResolutionUnit { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.BookScanDto.BookScanDto_resolution_unit CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.BookScanDto.BookScanDto_resolution_unit(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.BookScanDtoResolutionUnitMember1 = new global::Marechai.App.Models.BookScanDto_resolution_unitMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ResolutionUnit = new global::Marechai.App.Models.ResolutionUnit(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(BookScanDtoResolutionUnitMember1 != null) + { + return BookScanDtoResolutionUnitMember1.GetFieldDeserializers(); + } + else if(ResolutionUnit != null) + { + return ResolutionUnit.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(BookScanDtoResolutionUnitMember1 != null) + { + writer.WriteObjectValue(null, BookScanDtoResolutionUnitMember1); + } + else if(ResolutionUnit != null) + { + writer.WriteObjectValue(null, ResolutionUnit); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/BookScanDto_colorspaceMember1.cs b/Marechai.App/Services/Client/Models/BookScanDto_colorspaceMember1.cs new file mode 100644 index 00000000..6ca7cdc9 --- /dev/null +++ b/Marechai.App/Services/Client/Models/BookScanDto_colorspaceMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BookScanDto_colorspaceMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public BookScanDto_colorspaceMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.BookScanDto_colorspaceMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.BookScanDto_colorspaceMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/BookScanDto_resolution_unitMember1.cs b/Marechai.App/Services/Client/Models/BookScanDto_resolution_unitMember1.cs new file mode 100644 index 00000000..08af0d2e --- /dev/null +++ b/Marechai.App/Services/Client/Models/BookScanDto_resolution_unitMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BookScanDto_resolution_unitMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public BookScanDto_resolution_unitMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.BookScanDto_resolution_unitMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.BookScanDto_resolution_unitMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/BrowserTest.cs b/Marechai.App/Services/Client/Models/BrowserTest.cs new file mode 100644 index 00000000..e0f18816 --- /dev/null +++ b/Marechai.App/Services/Client/Models/BrowserTest.cs @@ -0,0 +1,167 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BrowserTest : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The agif property + public bool? Agif { get; set; } + /// The browser property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Browser { get; set; } +#nullable restore +#else + public string Browser { get; set; } +#endif + /// The colors property + public bool? Colors { get; set; } + /// The createdOn property + public DateTimeOffset? CreatedOn { get; set; } + /// The flash property + public bool? Flash { get; set; } + /// The frames property + public bool? Frames { get; set; } + /// The gif87 property + public bool? Gif87 { get; set; } + /// The gif89 property + public bool? Gif89 { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The jpeg property + public bool? Jpeg { get; set; } + /// The js property + public bool? Js { get; set; } + /// The os property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Os { get; set; } +#nullable restore +#else + public string Os { get; set; } +#endif + /// The platform property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Platform { get; set; } +#nullable restore +#else + public string Platform { get; set; } +#endif + /// The png property + public bool? Png { get; set; } + /// The pngt property + public bool? Pngt { get; set; } + /// The table property + public bool? Table { get; set; } + /// The updatedOn property + public DateTimeOffset? UpdatedOn { get; set; } + /// The userAgent property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserAgent { get; set; } +#nullable restore +#else + public string UserAgent { get; set; } +#endif + /// The version property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Version { get; set; } +#nullable restore +#else + public string Version { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BrowserTest() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.BrowserTest CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.BrowserTest(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "agif", n => { Agif = n.GetBoolValue(); } }, + { "browser", n => { Browser = n.GetStringValue(); } }, + { "colors", n => { Colors = n.GetBoolValue(); } }, + { "createdOn", n => { CreatedOn = n.GetDateTimeOffsetValue(); } }, + { "flash", n => { Flash = n.GetBoolValue(); } }, + { "frames", n => { Frames = n.GetBoolValue(); } }, + { "gif87", n => { Gif87 = n.GetBoolValue(); } }, + { "gif89", n => { Gif89 = n.GetBoolValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "jpeg", n => { Jpeg = n.GetBoolValue(); } }, + { "js", n => { Js = n.GetBoolValue(); } }, + { "os", n => { Os = n.GetStringValue(); } }, + { "platform", n => { Platform = n.GetStringValue(); } }, + { "png", n => { Png = n.GetBoolValue(); } }, + { "pngt", n => { Pngt = n.GetBoolValue(); } }, + { "table", n => { Table = n.GetBoolValue(); } }, + { "updatedOn", n => { UpdatedOn = n.GetDateTimeOffsetValue(); } }, + { "userAgent", n => { UserAgent = n.GetStringValue(); } }, + { "version", n => { Version = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("agif", Agif); + writer.WriteStringValue("browser", Browser); + writer.WriteBoolValue("colors", Colors); + writer.WriteDateTimeOffsetValue("createdOn", CreatedOn); + writer.WriteBoolValue("flash", Flash); + writer.WriteBoolValue("frames", Frames); + writer.WriteBoolValue("gif87", Gif87); + writer.WriteBoolValue("gif89", Gif89); + writer.WriteObjectValue("id", Id); + writer.WriteBoolValue("jpeg", Jpeg); + writer.WriteBoolValue("js", Js); + writer.WriteStringValue("os", Os); + writer.WriteStringValue("platform", Platform); + writer.WriteBoolValue("png", Png); + writer.WriteBoolValue("pngt", Pngt); + writer.WriteBoolValue("table", Table); + writer.WriteDateTimeOffsetValue("updatedOn", UpdatedOn); + writer.WriteStringValue("userAgent", UserAgent); + writer.WriteStringValue("version", Version); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/ColorSpace.cs b/Marechai.App/Services/Client/Models/ColorSpace.cs new file mode 100644 index 00000000..f5bb77f0 --- /dev/null +++ b/Marechai.App/Services/Client/Models/ColorSpace.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ColorSpace : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ColorSpace() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.ColorSpace CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.ColorSpace(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/CompanyByBookDto.cs b/Marechai.App/Services/Client/Models/CompanyByBookDto.cs new file mode 100644 index 00000000..77c3b253 --- /dev/null +++ b/Marechai.App/Services/Client/Models/CompanyByBookDto.cs @@ -0,0 +1,115 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CompanyByBookDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The book_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? BookId { get; set; } +#nullable restore +#else + public UntypedNode BookId { get; set; } +#endif + /// The company property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The company_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? CompanyId { get; set; } +#nullable restore +#else + public UntypedNode CompanyId { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The role property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Role { get; set; } +#nullable restore +#else + public string Role { get; set; } +#endif + /// The role_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RoleId { get; set; } +#nullable restore +#else + public string RoleId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CompanyByBookDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.CompanyByBookDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.CompanyByBookDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "book_id", n => { BookId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "company", n => { Company = n.GetStringValue(); } }, + { "company_id", n => { CompanyId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "role", n => { Role = n.GetStringValue(); } }, + { "role_id", n => { RoleId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("book_id", BookId); + writer.WriteStringValue("company", Company); + writer.WriteObjectValue("company_id", CompanyId); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("role", Role); + writer.WriteStringValue("role_id", RoleId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/CompanyByDocumentDto.cs b/Marechai.App/Services/Client/Models/CompanyByDocumentDto.cs new file mode 100644 index 00000000..2dc497ec --- /dev/null +++ b/Marechai.App/Services/Client/Models/CompanyByDocumentDto.cs @@ -0,0 +1,115 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CompanyByDocumentDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The company property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The company_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? CompanyId { get; set; } +#nullable restore +#else + public UntypedNode CompanyId { get; set; } +#endif + /// The document_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? DocumentId { get; set; } +#nullable restore +#else + public UntypedNode DocumentId { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The role property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Role { get; set; } +#nullable restore +#else + public string Role { get; set; } +#endif + /// The role_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RoleId { get; set; } +#nullable restore +#else + public string RoleId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CompanyByDocumentDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.CompanyByDocumentDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.CompanyByDocumentDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "company", n => { Company = n.GetStringValue(); } }, + { "company_id", n => { CompanyId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "document_id", n => { DocumentId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "role", n => { Role = n.GetStringValue(); } }, + { "role_id", n => { RoleId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("company", Company); + writer.WriteObjectValue("company_id", CompanyId); + writer.WriteObjectValue("document_id", DocumentId); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("role", Role); + writer.WriteStringValue("role_id", RoleId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/CompanyByMagazineDto.cs b/Marechai.App/Services/Client/Models/CompanyByMagazineDto.cs new file mode 100644 index 00000000..de56341a --- /dev/null +++ b/Marechai.App/Services/Client/Models/CompanyByMagazineDto.cs @@ -0,0 +1,115 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CompanyByMagazineDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The company property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The company_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? CompanyId { get; set; } +#nullable restore +#else + public UntypedNode CompanyId { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The magazine_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MagazineId { get; set; } +#nullable restore +#else + public UntypedNode MagazineId { get; set; } +#endif + /// The role property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Role { get; set; } +#nullable restore +#else + public string Role { get; set; } +#endif + /// The role_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RoleId { get; set; } +#nullable restore +#else + public string RoleId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CompanyByMagazineDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.CompanyByMagazineDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.CompanyByMagazineDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "company", n => { Company = n.GetStringValue(); } }, + { "company_id", n => { CompanyId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "magazine_id", n => { MagazineId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "role", n => { Role = n.GetStringValue(); } }, + { "role_id", n => { RoleId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("company", Company); + writer.WriteObjectValue("company_id", CompanyId); + writer.WriteObjectValue("id", Id); + writer.WriteObjectValue("magazine_id", MagazineId); + writer.WriteStringValue("role", Role); + writer.WriteStringValue("role_id", RoleId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/CompanyBySoftwareFamilyDto.cs b/Marechai.App/Services/Client/Models/CompanyBySoftwareFamilyDto.cs new file mode 100644 index 00000000..753a09e2 --- /dev/null +++ b/Marechai.App/Services/Client/Models/CompanyBySoftwareFamilyDto.cs @@ -0,0 +1,115 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CompanyBySoftwareFamilyDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The company property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The company_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? CompanyId { get; set; } +#nullable restore +#else + public UntypedNode CompanyId { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The role property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Role { get; set; } +#nullable restore +#else + public string Role { get; set; } +#endif + /// The role_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RoleId { get; set; } +#nullable restore +#else + public string RoleId { get; set; } +#endif + /// The software_family_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? SoftwareFamilyId { get; set; } +#nullable restore +#else + public UntypedNode SoftwareFamilyId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CompanyBySoftwareFamilyDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.CompanyBySoftwareFamilyDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.CompanyBySoftwareFamilyDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "company", n => { Company = n.GetStringValue(); } }, + { "company_id", n => { CompanyId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "role", n => { Role = n.GetStringValue(); } }, + { "role_id", n => { RoleId = n.GetStringValue(); } }, + { "software_family_id", n => { SoftwareFamilyId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("company", Company); + writer.WriteObjectValue("company_id", CompanyId); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("role", Role); + writer.WriteStringValue("role_id", RoleId); + writer.WriteObjectValue("software_family_id", SoftwareFamilyId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/CompanyBySoftwareVariantDto.cs b/Marechai.App/Services/Client/Models/CompanyBySoftwareVariantDto.cs new file mode 100644 index 00000000..f552d5a0 --- /dev/null +++ b/Marechai.App/Services/Client/Models/CompanyBySoftwareVariantDto.cs @@ -0,0 +1,115 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CompanyBySoftwareVariantDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The company property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The company_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? CompanyId { get; set; } +#nullable restore +#else + public UntypedNode CompanyId { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The role property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Role { get; set; } +#nullable restore +#else + public string Role { get; set; } +#endif + /// The role_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RoleId { get; set; } +#nullable restore +#else + public string RoleId { get; set; } +#endif + /// The software_variant_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? SoftwareVariantId { get; set; } +#nullable restore +#else + public UntypedNode SoftwareVariantId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CompanyBySoftwareVariantDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.CompanyBySoftwareVariantDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.CompanyBySoftwareVariantDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "company", n => { Company = n.GetStringValue(); } }, + { "company_id", n => { CompanyId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "role", n => { Role = n.GetStringValue(); } }, + { "role_id", n => { RoleId = n.GetStringValue(); } }, + { "software_variant_id", n => { SoftwareVariantId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("company", Company); + writer.WriteObjectValue("company_id", CompanyId); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("role", Role); + writer.WriteStringValue("role_id", RoleId); + writer.WriteObjectValue("software_variant_id", SoftwareVariantId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/CompanyBySoftwareVersionDto.cs b/Marechai.App/Services/Client/Models/CompanyBySoftwareVersionDto.cs new file mode 100644 index 00000000..89e98801 --- /dev/null +++ b/Marechai.App/Services/Client/Models/CompanyBySoftwareVersionDto.cs @@ -0,0 +1,115 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CompanyBySoftwareVersionDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The company property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The company_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? CompanyId { get; set; } +#nullable restore +#else + public UntypedNode CompanyId { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The role property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Role { get; set; } +#nullable restore +#else + public string Role { get; set; } +#endif + /// The role_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RoleId { get; set; } +#nullable restore +#else + public string RoleId { get; set; } +#endif + /// The software_version_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? SoftwareVersionId { get; set; } +#nullable restore +#else + public UntypedNode SoftwareVersionId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CompanyBySoftwareVersionDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.CompanyBySoftwareVersionDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.CompanyBySoftwareVersionDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "company", n => { Company = n.GetStringValue(); } }, + { "company_id", n => { CompanyId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "role", n => { Role = n.GetStringValue(); } }, + { "role_id", n => { RoleId = n.GetStringValue(); } }, + { "software_version_id", n => { SoftwareVersionId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("company", Company); + writer.WriteObjectValue("company_id", CompanyId); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("role", Role); + writer.WriteStringValue("role_id", RoleId); + writer.WriteObjectValue("software_version_id", SoftwareVersionId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/CompanyDescriptionDto.cs b/Marechai.App/Services/Client/Models/CompanyDescriptionDto.cs new file mode 100644 index 00000000..ed2a4b2e --- /dev/null +++ b/Marechai.App/Services/Client/Models/CompanyDescriptionDto.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CompanyDescriptionDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The company_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? CompanyId { get; set; } +#nullable restore +#else + public UntypedNode CompanyId { get; set; } +#endif + /// The html property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Html { get; set; } +#nullable restore +#else + public string Html { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The markdown property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Markdown { get; set; } +#nullable restore +#else + public string Markdown { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CompanyDescriptionDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.CompanyDescriptionDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.CompanyDescriptionDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "company_id", n => { CompanyId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "html", n => { Html = n.GetStringValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "markdown", n => { Markdown = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("company_id", CompanyId); + writer.WriteStringValue("html", Html); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("markdown", Markdown); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/CompanyDto.cs b/Marechai.App/Services/Client/Models/CompanyDto.cs new file mode 100644 index 00000000..772bc50f --- /dev/null +++ b/Marechai.App/Services/Client/Models/CompanyDto.cs @@ -0,0 +1,227 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CompanyDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The address property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Address { get; set; } +#nullable restore +#else + public string Address { get; set; } +#endif + /// The city property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? City { get; set; } +#nullable restore +#else + public string City { get; set; } +#endif + /// The country property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Country { get; set; } +#nullable restore +#else + public string Country { get; set; } +#endif + /// The country_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? CountryId { get; set; } +#nullable restore +#else + public UntypedNode CountryId { get; set; } +#endif + /// The facebook property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Facebook { get; set; } +#nullable restore +#else + public string Facebook { get; set; } +#endif + /// The founded property + public DateTimeOffset? Founded { get; set; } + /// The founded_day_is_unknown property + public bool? FoundedDayIsUnknown { get; set; } + /// The founded_month_is_unknown property + public bool? FoundedMonthIsUnknown { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The last_logo property + public Guid? LastLogo { get; set; } + /// The legal_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LegalName { get; set; } +#nullable restore +#else + public string LegalName { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The postal_code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PostalCode { get; set; } +#nullable restore +#else + public string PostalCode { get; set; } +#endif + /// The province property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Province { get; set; } +#nullable restore +#else + public string Province { get; set; } +#endif + /// The sold property + public DateTimeOffset? Sold { get; set; } + /// The sold_day_is_unknown property + public bool? SoldDayIsUnknown { get; set; } + /// The sold_month_is_unknown property + public bool? SoldMonthIsUnknown { get; set; } + /// The sold_to property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SoldTo { get; set; } +#nullable restore +#else + public string SoldTo { get; set; } +#endif + /// The sold_to_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? SoldToId { get; set; } +#nullable restore +#else + public UntypedNode SoldToId { get; set; } +#endif + /// The status property + public int? Status { get; set; } + /// The twitter property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Twitter { get; set; } +#nullable restore +#else + public string Twitter { get; set; } +#endif + /// The website property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Website { get; set; } +#nullable restore +#else + public string Website { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CompanyDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.CompanyDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.CompanyDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "address", n => { Address = n.GetStringValue(); } }, + { "city", n => { City = n.GetStringValue(); } }, + { "country", n => { Country = n.GetStringValue(); } }, + { "country_id", n => { CountryId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "facebook", n => { Facebook = n.GetStringValue(); } }, + { "founded", n => { Founded = n.GetDateTimeOffsetValue(); } }, + { "founded_day_is_unknown", n => { FoundedDayIsUnknown = n.GetBoolValue(); } }, + { "founded_month_is_unknown", n => { FoundedMonthIsUnknown = n.GetBoolValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "last_logo", n => { LastLogo = n.GetGuidValue(); } }, + { "legal_name", n => { LegalName = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "postal_code", n => { PostalCode = n.GetStringValue(); } }, + { "province", n => { Province = n.GetStringValue(); } }, + { "sold", n => { Sold = n.GetDateTimeOffsetValue(); } }, + { "sold_day_is_unknown", n => { SoldDayIsUnknown = n.GetBoolValue(); } }, + { "sold_month_is_unknown", n => { SoldMonthIsUnknown = n.GetBoolValue(); } }, + { "sold_to", n => { SoldTo = n.GetStringValue(); } }, + { "sold_to_id", n => { SoldToId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "status", n => { Status = n.GetIntValue(); } }, + { "twitter", n => { Twitter = n.GetStringValue(); } }, + { "website", n => { Website = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("address", Address); + writer.WriteStringValue("city", City); + writer.WriteStringValue("country", Country); + writer.WriteObjectValue("country_id", CountryId); + writer.WriteStringValue("facebook", Facebook); + writer.WriteDateTimeOffsetValue("founded", Founded); + writer.WriteBoolValue("founded_day_is_unknown", FoundedDayIsUnknown); + writer.WriteBoolValue("founded_month_is_unknown", FoundedMonthIsUnknown); + writer.WriteObjectValue("id", Id); + writer.WriteGuidValue("last_logo", LastLogo); + writer.WriteStringValue("legal_name", LegalName); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("postal_code", PostalCode); + writer.WriteStringValue("province", Province); + writer.WriteDateTimeOffsetValue("sold", Sold); + writer.WriteBoolValue("sold_day_is_unknown", SoldDayIsUnknown); + writer.WriteBoolValue("sold_month_is_unknown", SoldMonthIsUnknown); + writer.WriteStringValue("sold_to", SoldTo); + writer.WriteObjectValue("sold_to_id", SoldToId); + writer.WriteIntValue("status", Status); + writer.WriteStringValue("twitter", Twitter); + writer.WriteStringValue("website", Website); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/CompanyLogoDto.cs b/Marechai.App/Services/Client/Models/CompanyLogoDto.cs new file mode 100644 index 00000000..533ce1e4 --- /dev/null +++ b/Marechai.App/Services/Client/Models/CompanyLogoDto.cs @@ -0,0 +1,89 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CompanyLogoDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The company_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? CompanyId { get; set; } +#nullable restore +#else + public UntypedNode CompanyId { get; set; } +#endif + /// The guid property + public Guid? Guid { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The year property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Year { get; set; } +#nullable restore +#else + public UntypedNode Year { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CompanyLogoDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.CompanyLogoDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.CompanyLogoDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "company_id", n => { CompanyId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "guid", n => { Guid = n.GetGuidValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "year", n => { Year = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("company_id", CompanyId); + writer.WriteGuidValue("guid", Guid); + writer.WriteObjectValue("id", Id); + writer.WriteObjectValue("year", Year); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/Contrast.cs b/Marechai.App/Services/Client/Models/Contrast.cs new file mode 100644 index 00000000..af9dc775 --- /dev/null +++ b/Marechai.App/Services/Client/Models/Contrast.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Contrast : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Contrast() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.Contrast CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.Contrast(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/CurrencyInflationDto.cs b/Marechai.App/Services/Client/Models/CurrencyInflationDto.cs new file mode 100644 index 00000000..eb12b391 --- /dev/null +++ b/Marechai.App/Services/Client/Models/CurrencyInflationDto.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CurrencyInflationDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The inflation property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Inflation { get; set; } +#nullable restore +#else + public UntypedNode Inflation { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The year property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Year { get; set; } +#nullable restore +#else + public UntypedNode Year { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CurrencyInflationDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.CurrencyInflationDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.CurrencyInflationDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "inflation", n => { Inflation = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "year", n => { Year = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteObjectValue("id", Id); + writer.WriteObjectValue("inflation", Inflation); + writer.WriteStringValue("name", Name); + writer.WriteObjectValue("year", Year); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/CurrencyPeggingDto.cs b/Marechai.App/Services/Client/Models/CurrencyPeggingDto.cs new file mode 100644 index 00000000..3d6a1632 --- /dev/null +++ b/Marechai.App/Services/Client/Models/CurrencyPeggingDto.cs @@ -0,0 +1,123 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CurrencyPeggingDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The destination_code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DestinationCode { get; set; } +#nullable restore +#else + public string DestinationCode { get; set; } +#endif + /// The destination_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DestinationName { get; set; } +#nullable restore +#else + public string DestinationName { get; set; } +#endif + /// The end property + public DateTimeOffset? End { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The ratio property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Ratio { get; set; } +#nullable restore +#else + public UntypedNode Ratio { get; set; } +#endif + /// The source_code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SourceCode { get; set; } +#nullable restore +#else + public string SourceCode { get; set; } +#endif + /// The source_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SourceName { get; set; } +#nullable restore +#else + public string SourceName { get; set; } +#endif + /// The start property + public DateTimeOffset? Start { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CurrencyPeggingDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.CurrencyPeggingDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.CurrencyPeggingDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "destination_code", n => { DestinationCode = n.GetStringValue(); } }, + { "destination_name", n => { DestinationName = n.GetStringValue(); } }, + { "end", n => { End = n.GetDateTimeOffsetValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "ratio", n => { Ratio = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "source_code", n => { SourceCode = n.GetStringValue(); } }, + { "source_name", n => { SourceName = n.GetStringValue(); } }, + { "start", n => { Start = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("destination_code", DestinationCode); + writer.WriteStringValue("destination_name", DestinationName); + writer.WriteDateTimeOffsetValue("end", End); + writer.WriteObjectValue("id", Id); + writer.WriteObjectValue("ratio", Ratio); + writer.WriteStringValue("source_code", SourceCode); + writer.WriteStringValue("source_name", SourceName); + writer.WriteDateTimeOffsetValue("start", Start); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/DocumentByMachineDto.cs b/Marechai.App/Services/Client/Models/DocumentByMachineDto.cs new file mode 100644 index 00000000..9db55a9d --- /dev/null +++ b/Marechai.App/Services/Client/Models/DocumentByMachineDto.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DocumentByMachineDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The document property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Document { get; set; } +#nullable restore +#else + public string Document { get; set; } +#endif + /// The document_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? DocumentId { get; set; } +#nullable restore +#else + public UntypedNode DocumentId { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The machine property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Machine { get; set; } +#nullable restore +#else + public string Machine { get; set; } +#endif + /// The machine_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MachineId { get; set; } +#nullable restore +#else + public UntypedNode MachineId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DocumentByMachineDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.DocumentByMachineDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.DocumentByMachineDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "document", n => { Document = n.GetStringValue(); } }, + { "document_id", n => { DocumentId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "machine", n => { Machine = n.GetStringValue(); } }, + { "machine_id", n => { MachineId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("document", Document); + writer.WriteObjectValue("document_id", DocumentId); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("machine", Machine); + writer.WriteObjectValue("machine_id", MachineId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/DocumentByMachineFamilyDto.cs b/Marechai.App/Services/Client/Models/DocumentByMachineFamilyDto.cs new file mode 100644 index 00000000..6359085d --- /dev/null +++ b/Marechai.App/Services/Client/Models/DocumentByMachineFamilyDto.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DocumentByMachineFamilyDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The document property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Document { get; set; } +#nullable restore +#else + public string Document { get; set; } +#endif + /// The document_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? DocumentId { get; set; } +#nullable restore +#else + public UntypedNode DocumentId { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The machine_family property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MachineFamily { get; set; } +#nullable restore +#else + public string MachineFamily { get; set; } +#endif + /// The machine_family_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MachineFamilyId { get; set; } +#nullable restore +#else + public UntypedNode MachineFamilyId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DocumentByMachineFamilyDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.DocumentByMachineFamilyDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.DocumentByMachineFamilyDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "document", n => { Document = n.GetStringValue(); } }, + { "document_id", n => { DocumentId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "machine_family", n => { MachineFamily = n.GetStringValue(); } }, + { "machine_family_id", n => { MachineFamilyId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("document", Document); + writer.WriteObjectValue("document_id", DocumentId); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("machine_family", MachineFamily); + writer.WriteObjectValue("machine_family_id", MachineFamilyId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/DocumentCompanyDto.cs b/Marechai.App/Services/Client/Models/DocumentCompanyDto.cs new file mode 100644 index 00000000..3072525e --- /dev/null +++ b/Marechai.App/Services/Client/Models/DocumentCompanyDto.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DocumentCompanyDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The company property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The company_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? CompanyId { get; set; } +#nullable restore +#else + public UntypedNode CompanyId { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DocumentCompanyDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.DocumentCompanyDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.DocumentCompanyDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "company", n => { Company = n.GetStringValue(); } }, + { "company_id", n => { CompanyId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("company", Company); + writer.WriteObjectValue("company_id", CompanyId); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/DocumentDto.cs b/Marechai.App/Services/Client/Models/DocumentDto.cs new file mode 100644 index 00000000..a1221a51 --- /dev/null +++ b/Marechai.App/Services/Client/Models/DocumentDto.cs @@ -0,0 +1,119 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DocumentDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The country property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Country { get; set; } +#nullable restore +#else + public string Country { get; set; } +#endif + /// The country_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? CountryId { get; set; } +#nullable restore +#else + public UntypedNode CountryId { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The native_title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NativeTitle { get; set; } +#nullable restore +#else + public string NativeTitle { get; set; } +#endif + /// The published property + public DateTimeOffset? Published { get; set; } + /// The synopsis property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Synopsis { get; set; } +#nullable restore +#else + public string Synopsis { get; set; } +#endif + /// The title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DocumentDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.DocumentDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.DocumentDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "country", n => { Country = n.GetStringValue(); } }, + { "country_id", n => { CountryId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "native_title", n => { NativeTitle = n.GetStringValue(); } }, + { "published", n => { Published = n.GetDateTimeOffsetValue(); } }, + { "synopsis", n => { Synopsis = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("country", Country); + writer.WriteObjectValue("country_id", CountryId); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("native_title", NativeTitle); + writer.WriteDateTimeOffsetValue("published", Published); + writer.WriteStringValue("synopsis", Synopsis); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/DocumentPersonDto.cs b/Marechai.App/Services/Client/Models/DocumentPersonDto.cs new file mode 100644 index 00000000..e84cbc86 --- /dev/null +++ b/Marechai.App/Services/Client/Models/DocumentPersonDto.cs @@ -0,0 +1,125 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DocumentPersonDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The alias property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Alias { get; set; } +#nullable restore +#else + public string Alias { get; set; } +#endif + /// The display_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The person property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Person { get; set; } +#nullable restore +#else + public string Person { get; set; } +#endif + /// The person_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? PersonId { get; set; } +#nullable restore +#else + public UntypedNode PersonId { get; set; } +#endif + /// The surname property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Surname { get; set; } +#nullable restore +#else + public string Surname { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DocumentPersonDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.DocumentPersonDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.DocumentPersonDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "alias", n => { Alias = n.GetStringValue(); } }, + { "display_name", n => { DisplayName = n.GetStringValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "person", n => { Person = n.GetStringValue(); } }, + { "person_id", n => { PersonId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "surname", n => { Surname = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("alias", Alias); + writer.WriteStringValue("display_name", DisplayName); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("person", Person); + writer.WriteObjectValue("person_id", PersonId); + writer.WriteStringValue("surname", Surname); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/DocumentRoleDto.cs b/Marechai.App/Services/Client/Models/DocumentRoleDto.cs new file mode 100644 index 00000000..e9e8eb4b --- /dev/null +++ b/Marechai.App/Services/Client/Models/DocumentRoleDto.cs @@ -0,0 +1,79 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DocumentRoleDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The enabled property + public bool? Enabled { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { get; set; } +#nullable restore +#else + public string Id { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DocumentRoleDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.DocumentRoleDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.DocumentRoleDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/DocumentScanDto.cs b/Marechai.App/Services/Client/Models/DocumentScanDto.cs new file mode 100644 index 00000000..80fa0929 --- /dev/null +++ b/Marechai.App/Services/Client/Models/DocumentScanDto.cs @@ -0,0 +1,371 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DocumentScanDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The author property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Author { get; set; } +#nullable restore +#else + public string Author { get; set; } +#endif + /// The colorspace property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.DocumentScanDto.DocumentScanDto_colorspace? Colorspace { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.DocumentScanDto.DocumentScanDto_colorspace Colorspace { get; set; } +#endif + /// The comments property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Comments { get; set; } +#nullable restore +#else + public string Comments { get; set; } +#endif + /// The creation_date property + public DateTimeOffset? CreationDate { get; set; } + /// The document property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Document { get; set; } +#nullable restore +#else + public string Document { get; set; } +#endif + /// The document_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? DocumentId { get; set; } +#nullable restore +#else + public UntypedNode DocumentId { get; set; } +#endif + /// The exif_version property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ExifVersion { get; set; } +#nullable restore +#else + public string ExifVersion { get; set; } +#endif + /// The horizontal_resolution property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? HorizontalResolution { get; set; } +#nullable restore +#else + public UntypedNode HorizontalResolution { get; set; } +#endif + /// The id property + public Guid? Id { get; set; } + /// The original_extension property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OriginalExtension { get; set; } +#nullable restore +#else + public string OriginalExtension { get; set; } +#endif + /// The page property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Page { get; set; } +#nullable restore +#else + public UntypedNode Page { get; set; } +#endif + /// The resolution_unit property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.DocumentScanDto.DocumentScanDto_resolution_unit? ResolutionUnit { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.DocumentScanDto.DocumentScanDto_resolution_unit ResolutionUnit { get; set; } +#endif + /// The scanner_manufacturer property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ScannerManufacturer { get; set; } +#nullable restore +#else + public string ScannerManufacturer { get; set; } +#endif + /// The scanner_model property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ScannerModel { get; set; } +#nullable restore +#else + public string ScannerModel { get; set; } +#endif + /// The software property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Software { get; set; } +#nullable restore +#else + public string Software { get; set; } +#endif + /// The type property + public int? Type { get; set; } + /// The upload_date property + public DateTimeOffset? UploadDate { get; set; } + /// The user_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserId { get; set; } +#nullable restore +#else + public string UserId { get; set; } +#endif + /// The vertical_resolution property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? VerticalResolution { get; set; } +#nullable restore +#else + public UntypedNode VerticalResolution { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DocumentScanDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.DocumentScanDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.DocumentScanDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author", n => { Author = n.GetStringValue(); } }, + { "colorspace", n => { Colorspace = n.GetObjectValue(global::Marechai.App.Models.DocumentScanDto.DocumentScanDto_colorspace.CreateFromDiscriminatorValue); } }, + { "comments", n => { Comments = n.GetStringValue(); } }, + { "creation_date", n => { CreationDate = n.GetDateTimeOffsetValue(); } }, + { "document", n => { Document = n.GetStringValue(); } }, + { "document_id", n => { DocumentId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "exif_version", n => { ExifVersion = n.GetStringValue(); } }, + { "horizontal_resolution", n => { HorizontalResolution = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetGuidValue(); } }, + { "original_extension", n => { OriginalExtension = n.GetStringValue(); } }, + { "page", n => { Page = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "resolution_unit", n => { ResolutionUnit = n.GetObjectValue(global::Marechai.App.Models.DocumentScanDto.DocumentScanDto_resolution_unit.CreateFromDiscriminatorValue); } }, + { "scanner_manufacturer", n => { ScannerManufacturer = n.GetStringValue(); } }, + { "scanner_model", n => { ScannerModel = n.GetStringValue(); } }, + { "software", n => { Software = n.GetStringValue(); } }, + { "type", n => { Type = n.GetIntValue(); } }, + { "upload_date", n => { UploadDate = n.GetDateTimeOffsetValue(); } }, + { "user_id", n => { UserId = n.GetStringValue(); } }, + { "vertical_resolution", n => { VerticalResolution = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("author", Author); + writer.WriteObjectValue("colorspace", Colorspace); + writer.WriteStringValue("comments", Comments); + writer.WriteDateTimeOffsetValue("creation_date", CreationDate); + writer.WriteStringValue("document", Document); + writer.WriteObjectValue("document_id", DocumentId); + writer.WriteStringValue("exif_version", ExifVersion); + writer.WriteObjectValue("horizontal_resolution", HorizontalResolution); + writer.WriteGuidValue("id", Id); + writer.WriteStringValue("original_extension", OriginalExtension); + writer.WriteObjectValue("page", Page); + writer.WriteObjectValue("resolution_unit", ResolutionUnit); + writer.WriteStringValue("scanner_manufacturer", ScannerManufacturer); + writer.WriteStringValue("scanner_model", ScannerModel); + writer.WriteStringValue("software", Software); + writer.WriteIntValue("type", Type); + writer.WriteDateTimeOffsetValue("upload_date", UploadDate); + writer.WriteStringValue("user_id", UserId); + writer.WriteObjectValue("vertical_resolution", VerticalResolution); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DocumentScanDto_colorspace : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ColorSpace? ColorSpace { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ColorSpace ColorSpace { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.DocumentScanDto_colorspaceMember1? DocumentScanDtoColorspaceMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.DocumentScanDto_colorspaceMember1 DocumentScanDtoColorspaceMember1 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.DocumentScanDto.DocumentScanDto_colorspace CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.DocumentScanDto.DocumentScanDto_colorspace(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ColorSpace = new global::Marechai.App.Models.ColorSpace(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.DocumentScanDtoColorspaceMember1 = new global::Marechai.App.Models.DocumentScanDto_colorspaceMember1(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(ColorSpace != null) + { + return ColorSpace.GetFieldDeserializers(); + } + else if(DocumentScanDtoColorspaceMember1 != null) + { + return DocumentScanDtoColorspaceMember1.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(ColorSpace != null) + { + writer.WriteObjectValue(null, ColorSpace); + } + else if(DocumentScanDtoColorspaceMember1 != null) + { + writer.WriteObjectValue(null, DocumentScanDtoColorspaceMember1); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DocumentScanDto_resolution_unit : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.DocumentScanDto_resolution_unitMember1? DocumentScanDtoResolutionUnitMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.DocumentScanDto_resolution_unitMember1 DocumentScanDtoResolutionUnitMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ResolutionUnit? ResolutionUnit { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ResolutionUnit ResolutionUnit { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.DocumentScanDto.DocumentScanDto_resolution_unit CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.DocumentScanDto.DocumentScanDto_resolution_unit(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.DocumentScanDtoResolutionUnitMember1 = new global::Marechai.App.Models.DocumentScanDto_resolution_unitMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ResolutionUnit = new global::Marechai.App.Models.ResolutionUnit(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(DocumentScanDtoResolutionUnitMember1 != null) + { + return DocumentScanDtoResolutionUnitMember1.GetFieldDeserializers(); + } + else if(ResolutionUnit != null) + { + return ResolutionUnit.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(DocumentScanDtoResolutionUnitMember1 != null) + { + writer.WriteObjectValue(null, DocumentScanDtoResolutionUnitMember1); + } + else if(ResolutionUnit != null) + { + writer.WriteObjectValue(null, ResolutionUnit); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/DocumentScanDto_colorspaceMember1.cs b/Marechai.App/Services/Client/Models/DocumentScanDto_colorspaceMember1.cs new file mode 100644 index 00000000..7201c487 --- /dev/null +++ b/Marechai.App/Services/Client/Models/DocumentScanDto_colorspaceMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DocumentScanDto_colorspaceMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DocumentScanDto_colorspaceMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.DocumentScanDto_colorspaceMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.DocumentScanDto_colorspaceMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/DocumentScanDto_resolution_unitMember1.cs b/Marechai.App/Services/Client/Models/DocumentScanDto_resolution_unitMember1.cs new file mode 100644 index 00000000..95b80eae --- /dev/null +++ b/Marechai.App/Services/Client/Models/DocumentScanDto_resolution_unitMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DocumentScanDto_resolution_unitMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DocumentScanDto_resolution_unitMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.DocumentScanDto_resolution_unitMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.DocumentScanDto_resolution_unitMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/DumpDto.cs b/Marechai.App/Services/Client/Models/DumpDto.cs new file mode 100644 index 00000000..2961e8fc --- /dev/null +++ b/Marechai.App/Services/Client/Models/DumpDto.cs @@ -0,0 +1,139 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DumpDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The dump_date property + public DateTimeOffset? DumpDate { get; set; } + /// The dumper property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Dumper { get; set; } +#nullable restore +#else + public string Dumper { get; set; } +#endif + /// The dumping_group property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DumpingGroup { get; set; } +#nullable restore +#else + public string DumpingGroup { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The media_dump_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MediaDumpId { get; set; } +#nullable restore +#else + public UntypedNode MediaDumpId { get; set; } +#endif + /// The media_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MediaId { get; set; } +#nullable restore +#else + public UntypedNode MediaId { get; set; } +#endif + /// The media_title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MediaTitle { get; set; } +#nullable restore +#else + public string MediaTitle { get; set; } +#endif + /// The user_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserId { get; set; } +#nullable restore +#else + public string UserId { get; set; } +#endif + /// The username property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Username { get; set; } +#nullable restore +#else + public string Username { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DumpDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.DumpDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.DumpDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "dump_date", n => { DumpDate = n.GetDateTimeOffsetValue(); } }, + { "dumper", n => { Dumper = n.GetStringValue(); } }, + { "dumping_group", n => { DumpingGroup = n.GetStringValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "media_dump_id", n => { MediaDumpId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "media_id", n => { MediaId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "media_title", n => { MediaTitle = n.GetStringValue(); } }, + { "user_id", n => { UserId = n.GetStringValue(); } }, + { "username", n => { Username = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("dump_date", DumpDate); + writer.WriteStringValue("dumper", Dumper); + writer.WriteStringValue("dumping_group", DumpingGroup); + writer.WriteObjectValue("id", Id); + writer.WriteObjectValue("media_dump_id", MediaDumpId); + writer.WriteObjectValue("media_id", MediaId); + writer.WriteStringValue("media_title", MediaTitle); + writer.WriteStringValue("user_id", UserId); + writer.WriteStringValue("username", Username); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/ExposureMode.cs b/Marechai.App/Services/Client/Models/ExposureMode.cs new file mode 100644 index 00000000..e9db6d43 --- /dev/null +++ b/Marechai.App/Services/Client/Models/ExposureMode.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ExposureMode : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ExposureMode() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.ExposureMode CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.ExposureMode(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/ExposureProgram.cs b/Marechai.App/Services/Client/Models/ExposureProgram.cs new file mode 100644 index 00000000..a50a482b --- /dev/null +++ b/Marechai.App/Services/Client/Models/ExposureProgram.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ExposureProgram : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ExposureProgram() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.ExposureProgram CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.ExposureProgram(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/Flash.cs b/Marechai.App/Services/Client/Models/Flash.cs new file mode 100644 index 00000000..ab56ee87 --- /dev/null +++ b/Marechai.App/Services/Client/Models/Flash.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Flash : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Flash() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.Flash CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.Flash(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/GpuByMachineDto.cs b/Marechai.App/Services/Client/Models/GpuByMachineDto.cs new file mode 100644 index 00000000..164af8f4 --- /dev/null +++ b/Marechai.App/Services/Client/Models/GpuByMachineDto.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GpuByMachineDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The company property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The gpu_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? GpuId { get; set; } +#nullable restore +#else + public UntypedNode GpuId { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The machine_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MachineId { get; set; } +#nullable restore +#else + public UntypedNode MachineId { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GpuByMachineDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.GpuByMachineDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.GpuByMachineDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "company", n => { Company = n.GetStringValue(); } }, + { "gpu_id", n => { GpuId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "machine_id", n => { MachineId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("company", Company); + writer.WriteObjectValue("gpu_id", GpuId); + writer.WriteObjectValue("id", Id); + writer.WriteObjectValue("machine_id", MachineId); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/GpuDto.cs b/Marechai.App/Services/Client/Models/GpuDto.cs new file mode 100644 index 00000000..17bd2d10 --- /dev/null +++ b/Marechai.App/Services/Client/Models/GpuDto.cs @@ -0,0 +1,159 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GpuDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The company property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The company_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? CompanyId { get; set; } +#nullable restore +#else + public UntypedNode CompanyId { get; set; } +#endif + /// The die_size property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? DieSize { get; set; } +#nullable restore +#else + public UntypedNode DieSize { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The introduced property + public DateTimeOffset? Introduced { get; set; } + /// The model_code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ModelCode { get; set; } +#nullable restore +#else + public string ModelCode { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The package property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Package { get; set; } +#nullable restore +#else + public string Package { get; set; } +#endif + /// The process property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Process { get; set; } +#nullable restore +#else + public string Process { get; set; } +#endif + /// The process_nm property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? ProcessNm { get; set; } +#nullable restore +#else + public UntypedNode ProcessNm { get; set; } +#endif + /// The transistors property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Transistors { get; set; } +#nullable restore +#else + public UntypedNode Transistors { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GpuDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.GpuDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.GpuDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "company", n => { Company = n.GetStringValue(); } }, + { "company_id", n => { CompanyId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "die_size", n => { DieSize = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "introduced", n => { Introduced = n.GetDateTimeOffsetValue(); } }, + { "model_code", n => { ModelCode = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "package", n => { Package = n.GetStringValue(); } }, + { "process", n => { Process = n.GetStringValue(); } }, + { "process_nm", n => { ProcessNm = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "transistors", n => { Transistors = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("company", Company); + writer.WriteObjectValue("company_id", CompanyId); + writer.WriteObjectValue("die_size", DieSize); + writer.WriteObjectValue("id", Id); + writer.WriteDateTimeOffsetValue("introduced", Introduced); + writer.WriteStringValue("model_code", ModelCode); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("package", Package); + writer.WriteStringValue("process", Process); + writer.WriteObjectValue("process_nm", ProcessNm); + writer.WriteObjectValue("transistors", Transistors); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/InstructionSetDto.cs b/Marechai.App/Services/Client/Models/InstructionSetDto.cs new file mode 100644 index 00000000..36a153be --- /dev/null +++ b/Marechai.App/Services/Client/Models/InstructionSetDto.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class InstructionSetDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public InstructionSetDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.InstructionSetDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.InstructionSetDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/InstructionSetExtensionByProcessorDto.cs b/Marechai.App/Services/Client/Models/InstructionSetExtensionByProcessorDto.cs new file mode 100644 index 00000000..752158bd --- /dev/null +++ b/Marechai.App/Services/Client/Models/InstructionSetExtensionByProcessorDto.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class InstructionSetExtensionByProcessorDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The extension_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? ExtensionId { get; set; } +#nullable restore +#else + public UntypedNode ExtensionId { get; set; } +#endif + /// The extensions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Extensions { get; set; } +#nullable restore +#else + public string Extensions { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The processor property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Processor { get; set; } +#nullable restore +#else + public string Processor { get; set; } +#endif + /// The processor_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? ProcessorId { get; set; } +#nullable restore +#else + public UntypedNode ProcessorId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public InstructionSetExtensionByProcessorDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.InstructionSetExtensionByProcessorDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.InstructionSetExtensionByProcessorDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "extension_id", n => { ExtensionId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "extensions", n => { Extensions = n.GetStringValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "processor", n => { Processor = n.GetStringValue(); } }, + { "processor_id", n => { ProcessorId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("extension_id", ExtensionId); + writer.WriteStringValue("extensions", Extensions); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("processor", Processor); + writer.WriteObjectValue("processor_id", ProcessorId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/InstructionSetExtensionDto.cs b/Marechai.App/Services/Client/Models/InstructionSetExtensionDto.cs new file mode 100644 index 00000000..8652d4a3 --- /dev/null +++ b/Marechai.App/Services/Client/Models/InstructionSetExtensionDto.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class InstructionSetExtensionDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The extension property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Extension { get; set; } +#nullable restore +#else + public string Extension { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public InstructionSetExtensionDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.InstructionSetExtensionDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.InstructionSetExtensionDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "extension", n => { Extension = n.GetStringValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("extension", Extension); + writer.WriteObjectValue("id", Id); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/Iso31661NumericDto.cs b/Marechai.App/Services/Client/Models/Iso31661NumericDto.cs new file mode 100644 index 00000000..3d41056a --- /dev/null +++ b/Marechai.App/Services/Client/Models/Iso31661NumericDto.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Iso31661NumericDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public Iso31661NumericDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.Iso31661NumericDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.Iso31661NumericDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/Iso4217Dto.cs b/Marechai.App/Services/Client/Models/Iso4217Dto.cs new file mode 100644 index 00000000..e1948c25 --- /dev/null +++ b/Marechai.App/Services/Client/Models/Iso4217Dto.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Iso4217Dto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The minor_units property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MinorUnits { get; set; } +#nullable restore +#else + public UntypedNode MinorUnits { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The numeric property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Numeric { get; set; } +#nullable restore +#else + public UntypedNode Numeric { get; set; } +#endif + /// The withdrawn property + public DateTimeOffset? Withdrawn { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Iso4217Dto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.Iso4217Dto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.Iso4217Dto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "minor_units", n => { MinorUnits = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "numeric", n => { Numeric = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "withdrawn", n => { Withdrawn = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteObjectValue("minor_units", MinorUnits); + writer.WriteStringValue("name", Name); + writer.WriteObjectValue("numeric", Numeric); + writer.WriteDateTimeOffsetValue("withdrawn", Withdrawn); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/LicenseDto.cs b/Marechai.App/Services/Client/Models/LicenseDto.cs new file mode 100644 index 00000000..65eb8898 --- /dev/null +++ b/Marechai.App/Services/Client/Models/LicenseDto.cs @@ -0,0 +1,113 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LicenseDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The fsf_approved property + public bool? FsfApproved { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The link property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Link { get; set; } +#nullable restore +#else + public string Link { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The osi_approved property + public bool? OsiApproved { get; set; } + /// The spdx property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Spdx { get; set; } +#nullable restore +#else + public string Spdx { get; set; } +#endif + /// The text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Text { get; set; } +#nullable restore +#else + public string Text { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public LicenseDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.LicenseDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.LicenseDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "fsf_approved", n => { FsfApproved = n.GetBoolValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "link", n => { Link = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "osi_approved", n => { OsiApproved = n.GetBoolValue(); } }, + { "spdx", n => { Spdx = n.GetStringValue(); } }, + { "text", n => { Text = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("fsf_approved", FsfApproved); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("link", Link); + writer.WriteStringValue("name", Name); + writer.WriteBoolValue("osi_approved", OsiApproved); + writer.WriteStringValue("spdx", Spdx); + writer.WriteStringValue("text", Text); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/LightSource.cs b/Marechai.App/Services/Client/Models/LightSource.cs new file mode 100644 index 00000000..9539c2e8 --- /dev/null +++ b/Marechai.App/Services/Client/Models/LightSource.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LightSource : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public LightSource() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.LightSource CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.LightSource(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MachineDto.cs b/Marechai.App/Services/Client/Models/MachineDto.cs new file mode 100644 index 00000000..010ed183 --- /dev/null +++ b/Marechai.App/Services/Client/Models/MachineDto.cs @@ -0,0 +1,147 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachineDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The company property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The company_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? CompanyId { get; set; } +#nullable restore +#else + public UntypedNode CompanyId { get; set; } +#endif + /// The company_logo property + public Guid? CompanyLogo { get; set; } + /// The family property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Family { get; set; } +#nullable restore +#else + public string Family { get; set; } +#endif + /// The family_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? FamilyId { get; set; } +#nullable restore +#else + public UntypedNode FamilyId { get; set; } +#endif + /// The family_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FamilyName { get; set; } +#nullable restore +#else + public string FamilyName { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The introduced property + public DateTimeOffset? Introduced { get; set; } + /// The model property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Model { get; set; } +#nullable restore +#else + public string Model { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The type property + public int? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MachineDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachineDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MachineDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "company", n => { Company = n.GetStringValue(); } }, + { "company_id", n => { CompanyId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "company_logo", n => { CompanyLogo = n.GetGuidValue(); } }, + { "family", n => { Family = n.GetStringValue(); } }, + { "family_id", n => { FamilyId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "family_name", n => { FamilyName = n.GetStringValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "introduced", n => { Introduced = n.GetDateTimeOffsetValue(); } }, + { "model", n => { Model = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "type", n => { Type = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("company", Company); + writer.WriteObjectValue("company_id", CompanyId); + writer.WriteGuidValue("company_logo", CompanyLogo); + writer.WriteStringValue("family", Family); + writer.WriteObjectValue("family_id", FamilyId); + writer.WriteStringValue("family_name", FamilyName); + writer.WriteObjectValue("id", Id); + writer.WriteDateTimeOffsetValue("introduced", Introduced); + writer.WriteStringValue("model", Model); + writer.WriteStringValue("name", Name); + writer.WriteIntValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MachineFamilyDto.cs b/Marechai.App/Services/Client/Models/MachineFamilyDto.cs new file mode 100644 index 00000000..31400b8c --- /dev/null +++ b/Marechai.App/Services/Client/Models/MachineFamilyDto.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachineFamilyDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The company property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The company_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? CompanyId { get; set; } +#nullable restore +#else + public UntypedNode CompanyId { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MachineFamilyDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachineFamilyDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MachineFamilyDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "company", n => { Company = n.GetStringValue(); } }, + { "company_id", n => { CompanyId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("company", Company); + writer.WriteObjectValue("company_id", CompanyId); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MachinePhotoDto.cs b/Marechai.App/Services/Client/Models/MachinePhotoDto.cs new file mode 100644 index 00000000..d3992dda --- /dev/null +++ b/Marechai.App/Services/Client/Models/MachinePhotoDto.cs @@ -0,0 +1,1582 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachinePhotoDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The aperture property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Aperture { get; set; } +#nullable restore +#else + public UntypedNode Aperture { get; set; } +#endif + /// The author property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Author { get; set; } +#nullable restore +#else + public string Author { get; set; } +#endif + /// The camera_manufacturer property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CameraManufacturer { get; set; } +#nullable restore +#else + public string CameraManufacturer { get; set; } +#endif + /// The camera_model property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CameraModel { get; set; } +#nullable restore +#else + public string CameraModel { get; set; } +#endif + /// The colorspace property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_colorspace? Colorspace { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_colorspace Colorspace { get; set; } +#endif + /// The comments property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Comments { get; set; } +#nullable restore +#else + public string Comments { get; set; } +#endif + /// The contrast property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_contrast? Contrast { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_contrast Contrast { get; set; } +#endif + /// The creation_date property + public DateTimeOffset? CreationDate { get; set; } + /// The digital_zoom property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? DigitalZoom { get; set; } +#nullable restore +#else + public UntypedNode DigitalZoom { get; set; } +#endif + /// The exif_version property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ExifVersion { get; set; } +#nullable restore +#else + public string ExifVersion { get; set; } +#endif + /// The exposure property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Exposure { get; set; } +#nullable restore +#else + public UntypedNode Exposure { get; set; } +#endif + /// The exposure_method property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_exposure_method? ExposureMethod { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_exposure_method ExposureMethod { get; set; } +#endif + /// The exposure_program property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_exposure_program? ExposureProgram { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_exposure_program ExposureProgram { get; set; } +#endif + /// The flash property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_flash? Flash { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_flash Flash { get; set; } +#endif + /// The focal property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Focal { get; set; } +#nullable restore +#else + public UntypedNode Focal { get; set; } +#endif + /// The focal_equivalent property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? FocalEquivalent { get; set; } +#nullable restore +#else + public UntypedNode FocalEquivalent { get; set; } +#endif + /// The focal_length property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? FocalLength { get; set; } +#nullable restore +#else + public UntypedNode FocalLength { get; set; } +#endif + /// The horizontal_resolution property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? HorizontalResolution { get; set; } +#nullable restore +#else + public UntypedNode HorizontalResolution { get; set; } +#endif + /// The id property + public Guid? Id { get; set; } + /// The iso property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Iso { get; set; } +#nullable restore +#else + public UntypedNode Iso { get; set; } +#endif + /// The lens property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Lens { get; set; } +#nullable restore +#else + public string Lens { get; set; } +#endif + /// The license_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? LicenseId { get; set; } +#nullable restore +#else + public UntypedNode LicenseId { get; set; } +#endif + /// The license_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LicenseName { get; set; } +#nullable restore +#else + public string LicenseName { get; set; } +#endif + /// The light_source property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_light_source? LightSource { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_light_source LightSource { get; set; } +#endif + /// The machine_company_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MachineCompanyName { get; set; } +#nullable restore +#else + public string MachineCompanyName { get; set; } +#endif + /// The machine_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MachineId { get; set; } +#nullable restore +#else + public UntypedNode MachineId { get; set; } +#endif + /// The machine_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MachineName { get; set; } +#nullable restore +#else + public string MachineName { get; set; } +#endif + /// The metering_mode property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_metering_mode? MeteringMode { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_metering_mode MeteringMode { get; set; } +#endif + /// The orientation property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_orientation? Orientation { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_orientation Orientation { get; set; } +#endif + /// The original_extension property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OriginalExtension { get; set; } +#nullable restore +#else + public string OriginalExtension { get; set; } +#endif + /// The resolution_unit property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_resolution_unit? ResolutionUnit { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_resolution_unit ResolutionUnit { get; set; } +#endif + /// The saturation property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_saturation? Saturation { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_saturation Saturation { get; set; } +#endif + /// The scene_capture_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_scene_capture_type? SceneCaptureType { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_scene_capture_type SceneCaptureType { get; set; } +#endif + /// The sensing_method property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_sensing_method? SensingMethod { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_sensing_method SensingMethod { get; set; } +#endif + /// The sharpness property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_sharpness? Sharpness { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_sharpness Sharpness { get; set; } +#endif + /// The software property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Software { get; set; } +#nullable restore +#else + public string Software { get; set; } +#endif + /// The source property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Source { get; set; } +#nullable restore +#else + public string Source { get; set; } +#endif + /// The subject_distance_range property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_subject_distance_range? SubjectDistanceRange { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_subject_distance_range SubjectDistanceRange { get; set; } +#endif + /// The upload_date property + public DateTimeOffset? UploadDate { get; set; } + /// The user_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserId { get; set; } +#nullable restore +#else + public string UserId { get; set; } +#endif + /// The vertical_resolution property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? VerticalResolution { get; set; } +#nullable restore +#else + public UntypedNode VerticalResolution { get; set; } +#endif + /// The white_balance property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_white_balance? WhiteBalance { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_white_balance WhiteBalance { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MachinePhotoDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MachinePhotoDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "aperture", n => { Aperture = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "author", n => { Author = n.GetStringValue(); } }, + { "camera_manufacturer", n => { CameraManufacturer = n.GetStringValue(); } }, + { "camera_model", n => { CameraModel = n.GetStringValue(); } }, + { "colorspace", n => { Colorspace = n.GetObjectValue(global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_colorspace.CreateFromDiscriminatorValue); } }, + { "comments", n => { Comments = n.GetStringValue(); } }, + { "contrast", n => { Contrast = n.GetObjectValue(global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_contrast.CreateFromDiscriminatorValue); } }, + { "creation_date", n => { CreationDate = n.GetDateTimeOffsetValue(); } }, + { "digital_zoom", n => { DigitalZoom = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "exif_version", n => { ExifVersion = n.GetStringValue(); } }, + { "exposure", n => { Exposure = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "exposure_method", n => { ExposureMethod = n.GetObjectValue(global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_exposure_method.CreateFromDiscriminatorValue); } }, + { "exposure_program", n => { ExposureProgram = n.GetObjectValue(global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_exposure_program.CreateFromDiscriminatorValue); } }, + { "flash", n => { Flash = n.GetObjectValue(global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_flash.CreateFromDiscriminatorValue); } }, + { "focal", n => { Focal = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "focal_equivalent", n => { FocalEquivalent = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "focal_length", n => { FocalLength = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "horizontal_resolution", n => { HorizontalResolution = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetGuidValue(); } }, + { "iso", n => { Iso = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "lens", n => { Lens = n.GetStringValue(); } }, + { "license_id", n => { LicenseId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "license_name", n => { LicenseName = n.GetStringValue(); } }, + { "light_source", n => { LightSource = n.GetObjectValue(global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_light_source.CreateFromDiscriminatorValue); } }, + { "machine_company_name", n => { MachineCompanyName = n.GetStringValue(); } }, + { "machine_id", n => { MachineId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "machine_name", n => { MachineName = n.GetStringValue(); } }, + { "metering_mode", n => { MeteringMode = n.GetObjectValue(global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_metering_mode.CreateFromDiscriminatorValue); } }, + { "orientation", n => { Orientation = n.GetObjectValue(global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_orientation.CreateFromDiscriminatorValue); } }, + { "original_extension", n => { OriginalExtension = n.GetStringValue(); } }, + { "resolution_unit", n => { ResolutionUnit = n.GetObjectValue(global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_resolution_unit.CreateFromDiscriminatorValue); } }, + { "saturation", n => { Saturation = n.GetObjectValue(global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_saturation.CreateFromDiscriminatorValue); } }, + { "scene_capture_type", n => { SceneCaptureType = n.GetObjectValue(global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_scene_capture_type.CreateFromDiscriminatorValue); } }, + { "sensing_method", n => { SensingMethod = n.GetObjectValue(global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_sensing_method.CreateFromDiscriminatorValue); } }, + { "sharpness", n => { Sharpness = n.GetObjectValue(global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_sharpness.CreateFromDiscriminatorValue); } }, + { "software", n => { Software = n.GetStringValue(); } }, + { "source", n => { Source = n.GetStringValue(); } }, + { "subject_distance_range", n => { SubjectDistanceRange = n.GetObjectValue(global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_subject_distance_range.CreateFromDiscriminatorValue); } }, + { "upload_date", n => { UploadDate = n.GetDateTimeOffsetValue(); } }, + { "user_id", n => { UserId = n.GetStringValue(); } }, + { "vertical_resolution", n => { VerticalResolution = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "white_balance", n => { WhiteBalance = n.GetObjectValue(global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_white_balance.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("aperture", Aperture); + writer.WriteStringValue("author", Author); + writer.WriteStringValue("camera_manufacturer", CameraManufacturer); + writer.WriteStringValue("camera_model", CameraModel); + writer.WriteObjectValue("colorspace", Colorspace); + writer.WriteStringValue("comments", Comments); + writer.WriteObjectValue("contrast", Contrast); + writer.WriteDateTimeOffsetValue("creation_date", CreationDate); + writer.WriteObjectValue("digital_zoom", DigitalZoom); + writer.WriteStringValue("exif_version", ExifVersion); + writer.WriteObjectValue("exposure", Exposure); + writer.WriteObjectValue("exposure_method", ExposureMethod); + writer.WriteObjectValue("exposure_program", ExposureProgram); + writer.WriteObjectValue("flash", Flash); + writer.WriteObjectValue("focal", Focal); + writer.WriteObjectValue("focal_equivalent", FocalEquivalent); + writer.WriteObjectValue("focal_length", FocalLength); + writer.WriteObjectValue("horizontal_resolution", HorizontalResolution); + writer.WriteGuidValue("id", Id); + writer.WriteObjectValue("iso", Iso); + writer.WriteStringValue("lens", Lens); + writer.WriteObjectValue("license_id", LicenseId); + writer.WriteStringValue("license_name", LicenseName); + writer.WriteObjectValue("light_source", LightSource); + writer.WriteStringValue("machine_company_name", MachineCompanyName); + writer.WriteObjectValue("machine_id", MachineId); + writer.WriteStringValue("machine_name", MachineName); + writer.WriteObjectValue("metering_mode", MeteringMode); + writer.WriteObjectValue("orientation", Orientation); + writer.WriteStringValue("original_extension", OriginalExtension); + writer.WriteObjectValue("resolution_unit", ResolutionUnit); + writer.WriteObjectValue("saturation", Saturation); + writer.WriteObjectValue("scene_capture_type", SceneCaptureType); + writer.WriteObjectValue("sensing_method", SensingMethod); + writer.WriteObjectValue("sharpness", Sharpness); + writer.WriteStringValue("software", Software); + writer.WriteStringValue("source", Source); + writer.WriteObjectValue("subject_distance_range", SubjectDistanceRange); + writer.WriteDateTimeOffsetValue("upload_date", UploadDate); + writer.WriteStringValue("user_id", UserId); + writer.WriteObjectValue("vertical_resolution", VerticalResolution); + writer.WriteObjectValue("white_balance", WhiteBalance); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinePhotoDto_colorspace : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ColorSpace? ColorSpace { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ColorSpace ColorSpace { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto_colorspaceMember1? MachinePhotoDtoColorspaceMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto_colorspaceMember1 MachinePhotoDtoColorspaceMember1 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_colorspace CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_colorspace(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ColorSpace = new global::Marechai.App.Models.ColorSpace(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.MachinePhotoDtoColorspaceMember1 = new global::Marechai.App.Models.MachinePhotoDto_colorspaceMember1(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(ColorSpace != null) + { + return ColorSpace.GetFieldDeserializers(); + } + else if(MachinePhotoDtoColorspaceMember1 != null) + { + return MachinePhotoDtoColorspaceMember1.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(ColorSpace != null) + { + writer.WriteObjectValue(null, ColorSpace); + } + else if(MachinePhotoDtoColorspaceMember1 != null) + { + writer.WriteObjectValue(null, MachinePhotoDtoColorspaceMember1); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinePhotoDto_contrast : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.Contrast? Contrast { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.Contrast Contrast { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto_contrastMember1? MachinePhotoDtoContrastMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto_contrastMember1 MachinePhotoDtoContrastMember1 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_contrast CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_contrast(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.Contrast = new global::Marechai.App.Models.Contrast(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.MachinePhotoDtoContrastMember1 = new global::Marechai.App.Models.MachinePhotoDto_contrastMember1(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(Contrast != null) + { + return Contrast.GetFieldDeserializers(); + } + else if(MachinePhotoDtoContrastMember1 != null) + { + return MachinePhotoDtoContrastMember1.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(Contrast != null) + { + writer.WriteObjectValue(null, Contrast); + } + else if(MachinePhotoDtoContrastMember1 != null) + { + writer.WriteObjectValue(null, MachinePhotoDtoContrastMember1); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinePhotoDto_exposure_method : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ExposureMode? ExposureMode { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ExposureMode ExposureMode { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto_exposure_methodMember1? MachinePhotoDtoExposureMethodMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto_exposure_methodMember1 MachinePhotoDtoExposureMethodMember1 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_exposure_method CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_exposure_method(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ExposureMode = new global::Marechai.App.Models.ExposureMode(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.MachinePhotoDtoExposureMethodMember1 = new global::Marechai.App.Models.MachinePhotoDto_exposure_methodMember1(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(ExposureMode != null) + { + return ExposureMode.GetFieldDeserializers(); + } + else if(MachinePhotoDtoExposureMethodMember1 != null) + { + return MachinePhotoDtoExposureMethodMember1.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(ExposureMode != null) + { + writer.WriteObjectValue(null, ExposureMode); + } + else if(MachinePhotoDtoExposureMethodMember1 != null) + { + writer.WriteObjectValue(null, MachinePhotoDtoExposureMethodMember1); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinePhotoDto_exposure_program : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ExposureProgram? ExposureProgram { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ExposureProgram ExposureProgram { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto_exposure_programMember1? MachinePhotoDtoExposureProgramMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto_exposure_programMember1 MachinePhotoDtoExposureProgramMember1 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_exposure_program CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_exposure_program(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ExposureProgram = new global::Marechai.App.Models.ExposureProgram(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.MachinePhotoDtoExposureProgramMember1 = new global::Marechai.App.Models.MachinePhotoDto_exposure_programMember1(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(ExposureProgram != null) + { + return ExposureProgram.GetFieldDeserializers(); + } + else if(MachinePhotoDtoExposureProgramMember1 != null) + { + return MachinePhotoDtoExposureProgramMember1.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(ExposureProgram != null) + { + writer.WriteObjectValue(null, ExposureProgram); + } + else if(MachinePhotoDtoExposureProgramMember1 != null) + { + writer.WriteObjectValue(null, MachinePhotoDtoExposureProgramMember1); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinePhotoDto_flash : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.Flash? Flash { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.Flash Flash { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto_flashMember1? MachinePhotoDtoFlashMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto_flashMember1 MachinePhotoDtoFlashMember1 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_flash CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_flash(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.Flash = new global::Marechai.App.Models.Flash(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.MachinePhotoDtoFlashMember1 = new global::Marechai.App.Models.MachinePhotoDto_flashMember1(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(Flash != null) + { + return Flash.GetFieldDeserializers(); + } + else if(MachinePhotoDtoFlashMember1 != null) + { + return MachinePhotoDtoFlashMember1.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(Flash != null) + { + writer.WriteObjectValue(null, Flash); + } + else if(MachinePhotoDtoFlashMember1 != null) + { + writer.WriteObjectValue(null, MachinePhotoDtoFlashMember1); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinePhotoDto_light_source : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.LightSource? LightSource { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.LightSource LightSource { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto_light_sourceMember1? MachinePhotoDtoLightSourceMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto_light_sourceMember1 MachinePhotoDtoLightSourceMember1 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_light_source CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_light_source(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.LightSource = new global::Marechai.App.Models.LightSource(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.MachinePhotoDtoLightSourceMember1 = new global::Marechai.App.Models.MachinePhotoDto_light_sourceMember1(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(LightSource != null) + { + return LightSource.GetFieldDeserializers(); + } + else if(MachinePhotoDtoLightSourceMember1 != null) + { + return MachinePhotoDtoLightSourceMember1.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(LightSource != null) + { + writer.WriteObjectValue(null, LightSource); + } + else if(MachinePhotoDtoLightSourceMember1 != null) + { + writer.WriteObjectValue(null, MachinePhotoDtoLightSourceMember1); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinePhotoDto_metering_mode : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto_metering_modeMember1? MachinePhotoDtoMeteringModeMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto_metering_modeMember1 MachinePhotoDtoMeteringModeMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MeteringMode? MeteringMode { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MeteringMode MeteringMode { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_metering_mode CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_metering_mode(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.MachinePhotoDtoMeteringModeMember1 = new global::Marechai.App.Models.MachinePhotoDto_metering_modeMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.MeteringMode = new global::Marechai.App.Models.MeteringMode(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(MachinePhotoDtoMeteringModeMember1 != null) + { + return MachinePhotoDtoMeteringModeMember1.GetFieldDeserializers(); + } + else if(MeteringMode != null) + { + return MeteringMode.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(MachinePhotoDtoMeteringModeMember1 != null) + { + writer.WriteObjectValue(null, MachinePhotoDtoMeteringModeMember1); + } + else if(MeteringMode != null) + { + writer.WriteObjectValue(null, MeteringMode); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinePhotoDto_orientation : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto_orientationMember1? MachinePhotoDtoOrientationMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto_orientationMember1 MachinePhotoDtoOrientationMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.Orientation? Orientation { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.Orientation Orientation { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_orientation CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_orientation(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.MachinePhotoDtoOrientationMember1 = new global::Marechai.App.Models.MachinePhotoDto_orientationMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.Orientation = new global::Marechai.App.Models.Orientation(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(MachinePhotoDtoOrientationMember1 != null) + { + return MachinePhotoDtoOrientationMember1.GetFieldDeserializers(); + } + else if(Orientation != null) + { + return Orientation.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(MachinePhotoDtoOrientationMember1 != null) + { + writer.WriteObjectValue(null, MachinePhotoDtoOrientationMember1); + } + else if(Orientation != null) + { + writer.WriteObjectValue(null, Orientation); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinePhotoDto_resolution_unit : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto_resolution_unitMember1? MachinePhotoDtoResolutionUnitMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto_resolution_unitMember1 MachinePhotoDtoResolutionUnitMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ResolutionUnit? ResolutionUnit { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ResolutionUnit ResolutionUnit { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_resolution_unit CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_resolution_unit(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.MachinePhotoDtoResolutionUnitMember1 = new global::Marechai.App.Models.MachinePhotoDto_resolution_unitMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ResolutionUnit = new global::Marechai.App.Models.ResolutionUnit(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(MachinePhotoDtoResolutionUnitMember1 != null) + { + return MachinePhotoDtoResolutionUnitMember1.GetFieldDeserializers(); + } + else if(ResolutionUnit != null) + { + return ResolutionUnit.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(MachinePhotoDtoResolutionUnitMember1 != null) + { + writer.WriteObjectValue(null, MachinePhotoDtoResolutionUnitMember1); + } + else if(ResolutionUnit != null) + { + writer.WriteObjectValue(null, ResolutionUnit); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinePhotoDto_saturation : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto_saturationMember1? MachinePhotoDtoSaturationMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto_saturationMember1 MachinePhotoDtoSaturationMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.Saturation? Saturation { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.Saturation Saturation { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_saturation CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_saturation(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.MachinePhotoDtoSaturationMember1 = new global::Marechai.App.Models.MachinePhotoDto_saturationMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.Saturation = new global::Marechai.App.Models.Saturation(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(MachinePhotoDtoSaturationMember1 != null) + { + return MachinePhotoDtoSaturationMember1.GetFieldDeserializers(); + } + else if(Saturation != null) + { + return Saturation.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(MachinePhotoDtoSaturationMember1 != null) + { + writer.WriteObjectValue(null, MachinePhotoDtoSaturationMember1); + } + else if(Saturation != null) + { + writer.WriteObjectValue(null, Saturation); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinePhotoDto_scene_capture_type : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto_scene_capture_typeMember1? MachinePhotoDtoSceneCaptureTypeMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto_scene_capture_typeMember1 MachinePhotoDtoSceneCaptureTypeMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.SceneCaptureType? SceneCaptureType { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.SceneCaptureType SceneCaptureType { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_scene_capture_type CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_scene_capture_type(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.MachinePhotoDtoSceneCaptureTypeMember1 = new global::Marechai.App.Models.MachinePhotoDto_scene_capture_typeMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SceneCaptureType = new global::Marechai.App.Models.SceneCaptureType(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(MachinePhotoDtoSceneCaptureTypeMember1 != null) + { + return MachinePhotoDtoSceneCaptureTypeMember1.GetFieldDeserializers(); + } + else if(SceneCaptureType != null) + { + return SceneCaptureType.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(MachinePhotoDtoSceneCaptureTypeMember1 != null) + { + writer.WriteObjectValue(null, MachinePhotoDtoSceneCaptureTypeMember1); + } + else if(SceneCaptureType != null) + { + writer.WriteObjectValue(null, SceneCaptureType); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinePhotoDto_sensing_method : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto_sensing_methodMember1? MachinePhotoDtoSensingMethodMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto_sensing_methodMember1 MachinePhotoDtoSensingMethodMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.SensingMethod? SensingMethod { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.SensingMethod SensingMethod { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_sensing_method CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_sensing_method(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.MachinePhotoDtoSensingMethodMember1 = new global::Marechai.App.Models.MachinePhotoDto_sensing_methodMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SensingMethod = new global::Marechai.App.Models.SensingMethod(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(MachinePhotoDtoSensingMethodMember1 != null) + { + return MachinePhotoDtoSensingMethodMember1.GetFieldDeserializers(); + } + else if(SensingMethod != null) + { + return SensingMethod.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(MachinePhotoDtoSensingMethodMember1 != null) + { + writer.WriteObjectValue(null, MachinePhotoDtoSensingMethodMember1); + } + else if(SensingMethod != null) + { + writer.WriteObjectValue(null, SensingMethod); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinePhotoDto_sharpness : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto_sharpnessMember1? MachinePhotoDtoSharpnessMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto_sharpnessMember1 MachinePhotoDtoSharpnessMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.Sharpness? Sharpness { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.Sharpness Sharpness { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_sharpness CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_sharpness(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.MachinePhotoDtoSharpnessMember1 = new global::Marechai.App.Models.MachinePhotoDto_sharpnessMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.Sharpness = new global::Marechai.App.Models.Sharpness(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(MachinePhotoDtoSharpnessMember1 != null) + { + return MachinePhotoDtoSharpnessMember1.GetFieldDeserializers(); + } + else if(Sharpness != null) + { + return Sharpness.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(MachinePhotoDtoSharpnessMember1 != null) + { + writer.WriteObjectValue(null, MachinePhotoDtoSharpnessMember1); + } + else if(Sharpness != null) + { + writer.WriteObjectValue(null, Sharpness); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinePhotoDto_subject_distance_range : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto_subject_distance_rangeMember1? MachinePhotoDtoSubjectDistanceRangeMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto_subject_distance_rangeMember1 MachinePhotoDtoSubjectDistanceRangeMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.SubjectDistanceRange? SubjectDistanceRange { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.SubjectDistanceRange SubjectDistanceRange { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_subject_distance_range CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_subject_distance_range(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.MachinePhotoDtoSubjectDistanceRangeMember1 = new global::Marechai.App.Models.MachinePhotoDto_subject_distance_rangeMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SubjectDistanceRange = new global::Marechai.App.Models.SubjectDistanceRange(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(MachinePhotoDtoSubjectDistanceRangeMember1 != null) + { + return MachinePhotoDtoSubjectDistanceRangeMember1.GetFieldDeserializers(); + } + else if(SubjectDistanceRange != null) + { + return SubjectDistanceRange.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(MachinePhotoDtoSubjectDistanceRangeMember1 != null) + { + writer.WriteObjectValue(null, MachinePhotoDtoSubjectDistanceRangeMember1); + } + else if(SubjectDistanceRange != null) + { + writer.WriteObjectValue(null, SubjectDistanceRange); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MachinePhotoDto_white_balance : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MachinePhotoDto_white_balanceMember1? MachinePhotoDtoWhiteBalanceMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MachinePhotoDto_white_balanceMember1 MachinePhotoDtoWhiteBalanceMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.WhiteBalance? WhiteBalance { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.WhiteBalance WhiteBalance { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_white_balance CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.MachinePhotoDto.MachinePhotoDto_white_balance(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.MachinePhotoDtoWhiteBalanceMember1 = new global::Marechai.App.Models.MachinePhotoDto_white_balanceMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.WhiteBalance = new global::Marechai.App.Models.WhiteBalance(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(MachinePhotoDtoWhiteBalanceMember1 != null) + { + return MachinePhotoDtoWhiteBalanceMember1.GetFieldDeserializers(); + } + else if(WhiteBalance != null) + { + return WhiteBalance.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(MachinePhotoDtoWhiteBalanceMember1 != null) + { + writer.WriteObjectValue(null, MachinePhotoDtoWhiteBalanceMember1); + } + else if(WhiteBalance != null) + { + writer.WriteObjectValue(null, WhiteBalance); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MachinePhotoDto_colorspaceMember1.cs b/Marechai.App/Services/Client/Models/MachinePhotoDto_colorspaceMember1.cs new file mode 100644 index 00000000..159c26db --- /dev/null +++ b/Marechai.App/Services/Client/Models/MachinePhotoDto_colorspaceMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachinePhotoDto_colorspaceMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MachinePhotoDto_colorspaceMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto_colorspaceMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MachinePhotoDto_colorspaceMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MachinePhotoDto_contrastMember1.cs b/Marechai.App/Services/Client/Models/MachinePhotoDto_contrastMember1.cs new file mode 100644 index 00000000..54462418 --- /dev/null +++ b/Marechai.App/Services/Client/Models/MachinePhotoDto_contrastMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachinePhotoDto_contrastMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MachinePhotoDto_contrastMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto_contrastMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MachinePhotoDto_contrastMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MachinePhotoDto_exposure_methodMember1.cs b/Marechai.App/Services/Client/Models/MachinePhotoDto_exposure_methodMember1.cs new file mode 100644 index 00000000..9a8badc3 --- /dev/null +++ b/Marechai.App/Services/Client/Models/MachinePhotoDto_exposure_methodMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachinePhotoDto_exposure_methodMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MachinePhotoDto_exposure_methodMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto_exposure_methodMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MachinePhotoDto_exposure_methodMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MachinePhotoDto_exposure_programMember1.cs b/Marechai.App/Services/Client/Models/MachinePhotoDto_exposure_programMember1.cs new file mode 100644 index 00000000..93956885 --- /dev/null +++ b/Marechai.App/Services/Client/Models/MachinePhotoDto_exposure_programMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachinePhotoDto_exposure_programMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MachinePhotoDto_exposure_programMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto_exposure_programMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MachinePhotoDto_exposure_programMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MachinePhotoDto_flashMember1.cs b/Marechai.App/Services/Client/Models/MachinePhotoDto_flashMember1.cs new file mode 100644 index 00000000..7c3eb378 --- /dev/null +++ b/Marechai.App/Services/Client/Models/MachinePhotoDto_flashMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachinePhotoDto_flashMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MachinePhotoDto_flashMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto_flashMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MachinePhotoDto_flashMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MachinePhotoDto_light_sourceMember1.cs b/Marechai.App/Services/Client/Models/MachinePhotoDto_light_sourceMember1.cs new file mode 100644 index 00000000..50ff6112 --- /dev/null +++ b/Marechai.App/Services/Client/Models/MachinePhotoDto_light_sourceMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachinePhotoDto_light_sourceMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MachinePhotoDto_light_sourceMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto_light_sourceMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MachinePhotoDto_light_sourceMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MachinePhotoDto_metering_modeMember1.cs b/Marechai.App/Services/Client/Models/MachinePhotoDto_metering_modeMember1.cs new file mode 100644 index 00000000..4e02495f --- /dev/null +++ b/Marechai.App/Services/Client/Models/MachinePhotoDto_metering_modeMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachinePhotoDto_metering_modeMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MachinePhotoDto_metering_modeMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto_metering_modeMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MachinePhotoDto_metering_modeMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MachinePhotoDto_orientationMember1.cs b/Marechai.App/Services/Client/Models/MachinePhotoDto_orientationMember1.cs new file mode 100644 index 00000000..faa17c78 --- /dev/null +++ b/Marechai.App/Services/Client/Models/MachinePhotoDto_orientationMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachinePhotoDto_orientationMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MachinePhotoDto_orientationMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto_orientationMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MachinePhotoDto_orientationMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MachinePhotoDto_resolution_unitMember1.cs b/Marechai.App/Services/Client/Models/MachinePhotoDto_resolution_unitMember1.cs new file mode 100644 index 00000000..5ad3ead6 --- /dev/null +++ b/Marechai.App/Services/Client/Models/MachinePhotoDto_resolution_unitMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachinePhotoDto_resolution_unitMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MachinePhotoDto_resolution_unitMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto_resolution_unitMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MachinePhotoDto_resolution_unitMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MachinePhotoDto_saturationMember1.cs b/Marechai.App/Services/Client/Models/MachinePhotoDto_saturationMember1.cs new file mode 100644 index 00000000..03ef48b6 --- /dev/null +++ b/Marechai.App/Services/Client/Models/MachinePhotoDto_saturationMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachinePhotoDto_saturationMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MachinePhotoDto_saturationMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto_saturationMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MachinePhotoDto_saturationMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MachinePhotoDto_scene_capture_typeMember1.cs b/Marechai.App/Services/Client/Models/MachinePhotoDto_scene_capture_typeMember1.cs new file mode 100644 index 00000000..7f1abd46 --- /dev/null +++ b/Marechai.App/Services/Client/Models/MachinePhotoDto_scene_capture_typeMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachinePhotoDto_scene_capture_typeMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MachinePhotoDto_scene_capture_typeMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto_scene_capture_typeMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MachinePhotoDto_scene_capture_typeMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MachinePhotoDto_sensing_methodMember1.cs b/Marechai.App/Services/Client/Models/MachinePhotoDto_sensing_methodMember1.cs new file mode 100644 index 00000000..44664dbe --- /dev/null +++ b/Marechai.App/Services/Client/Models/MachinePhotoDto_sensing_methodMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachinePhotoDto_sensing_methodMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MachinePhotoDto_sensing_methodMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto_sensing_methodMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MachinePhotoDto_sensing_methodMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MachinePhotoDto_sharpnessMember1.cs b/Marechai.App/Services/Client/Models/MachinePhotoDto_sharpnessMember1.cs new file mode 100644 index 00000000..bfa86ee1 --- /dev/null +++ b/Marechai.App/Services/Client/Models/MachinePhotoDto_sharpnessMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachinePhotoDto_sharpnessMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MachinePhotoDto_sharpnessMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto_sharpnessMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MachinePhotoDto_sharpnessMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MachinePhotoDto_subject_distance_rangeMember1.cs b/Marechai.App/Services/Client/Models/MachinePhotoDto_subject_distance_rangeMember1.cs new file mode 100644 index 00000000..4b0717b3 --- /dev/null +++ b/Marechai.App/Services/Client/Models/MachinePhotoDto_subject_distance_rangeMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachinePhotoDto_subject_distance_rangeMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MachinePhotoDto_subject_distance_rangeMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto_subject_distance_rangeMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MachinePhotoDto_subject_distance_rangeMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MachinePhotoDto_white_balanceMember1.cs b/Marechai.App/Services/Client/Models/MachinePhotoDto_white_balanceMember1.cs new file mode 100644 index 00000000..f3626a4e --- /dev/null +++ b/Marechai.App/Services/Client/Models/MachinePhotoDto_white_balanceMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MachinePhotoDto_white_balanceMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MachinePhotoDto_white_balanceMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MachinePhotoDto_white_balanceMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MachinePhotoDto_white_balanceMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MagazineByMachineDto.cs b/Marechai.App/Services/Client/Models/MagazineByMachineDto.cs new file mode 100644 index 00000000..4b9cce0a --- /dev/null +++ b/Marechai.App/Services/Client/Models/MagazineByMachineDto.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MagazineByMachineDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The machine property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Machine { get; set; } +#nullable restore +#else + public string Machine { get; set; } +#endif + /// The machine_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MachineId { get; set; } +#nullable restore +#else + public UntypedNode MachineId { get; set; } +#endif + /// The magazine property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Magazine { get; set; } +#nullable restore +#else + public string Magazine { get; set; } +#endif + /// The magazine_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MagazineId { get; set; } +#nullable restore +#else + public UntypedNode MagazineId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MagazineByMachineDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MagazineByMachineDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MagazineByMachineDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "machine", n => { Machine = n.GetStringValue(); } }, + { "machine_id", n => { MachineId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "magazine", n => { Magazine = n.GetStringValue(); } }, + { "magazine_id", n => { MagazineId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("machine", Machine); + writer.WriteObjectValue("machine_id", MachineId); + writer.WriteStringValue("magazine", Magazine); + writer.WriteObjectValue("magazine_id", MagazineId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MagazineByMachineFamilyDto.cs b/Marechai.App/Services/Client/Models/MagazineByMachineFamilyDto.cs new file mode 100644 index 00000000..93376d37 --- /dev/null +++ b/Marechai.App/Services/Client/Models/MagazineByMachineFamilyDto.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MagazineByMachineFamilyDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The machine_family property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MachineFamily { get; set; } +#nullable restore +#else + public string MachineFamily { get; set; } +#endif + /// The machine_family_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MachineFamilyId { get; set; } +#nullable restore +#else + public UntypedNode MachineFamilyId { get; set; } +#endif + /// The magazine property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Magazine { get; set; } +#nullable restore +#else + public string Magazine { get; set; } +#endif + /// The magazine_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MagazineId { get; set; } +#nullable restore +#else + public UntypedNode MagazineId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MagazineByMachineFamilyDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MagazineByMachineFamilyDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MagazineByMachineFamilyDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "machine_family", n => { MachineFamily = n.GetStringValue(); } }, + { "machine_family_id", n => { MachineFamilyId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "magazine", n => { Magazine = n.GetStringValue(); } }, + { "magazine_id", n => { MagazineId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("machine_family", MachineFamily); + writer.WriteObjectValue("machine_family_id", MachineFamilyId); + writer.WriteStringValue("magazine", Magazine); + writer.WriteObjectValue("magazine_id", MagazineId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MagazineDto.cs b/Marechai.App/Services/Client/Models/MagazineDto.cs new file mode 100644 index 00000000..9cd2a703 --- /dev/null +++ b/Marechai.App/Services/Client/Models/MagazineDto.cs @@ -0,0 +1,133 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MagazineDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The country property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Country { get; set; } +#nullable restore +#else + public string Country { get; set; } +#endif + /// The country_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? CountryId { get; set; } +#nullable restore +#else + public UntypedNode CountryId { get; set; } +#endif + /// The first_publication property + public DateTimeOffset? FirstPublication { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The issn property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Issn { get; set; } +#nullable restore +#else + public string Issn { get; set; } +#endif + /// The native_title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NativeTitle { get; set; } +#nullable restore +#else + public string NativeTitle { get; set; } +#endif + /// The published property + public DateTimeOffset? Published { get; set; } + /// The synopsis property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Synopsis { get; set; } +#nullable restore +#else + public string Synopsis { get; set; } +#endif + /// The title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MagazineDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MagazineDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MagazineDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "country", n => { Country = n.GetStringValue(); } }, + { "country_id", n => { CountryId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "first_publication", n => { FirstPublication = n.GetDateTimeOffsetValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "issn", n => { Issn = n.GetStringValue(); } }, + { "native_title", n => { NativeTitle = n.GetStringValue(); } }, + { "published", n => { Published = n.GetDateTimeOffsetValue(); } }, + { "synopsis", n => { Synopsis = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("country", Country); + writer.WriteObjectValue("country_id", CountryId); + writer.WriteDateTimeOffsetValue("first_publication", FirstPublication); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("issn", Issn); + writer.WriteStringValue("native_title", NativeTitle); + writer.WriteDateTimeOffsetValue("published", Published); + writer.WriteStringValue("synopsis", Synopsis); + writer.WriteStringValue("title", Title); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MagazineIssueDto.cs b/Marechai.App/Services/Client/Models/MagazineIssueDto.cs new file mode 100644 index 00000000..87b5828c --- /dev/null +++ b/Marechai.App/Services/Client/Models/MagazineIssueDto.cs @@ -0,0 +1,139 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MagazineIssueDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The caption property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Caption { get; set; } +#nullable restore +#else + public string Caption { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The issue_number property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? IssueNumber { get; set; } +#nullable restore +#else + public UntypedNode IssueNumber { get; set; } +#endif + /// The magazine_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MagazineId { get; set; } +#nullable restore +#else + public UntypedNode MagazineId { get; set; } +#endif + /// The magazine_title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MagazineTitle { get; set; } +#nullable restore +#else + public string MagazineTitle { get; set; } +#endif + /// The native_caption property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NativeCaption { get; set; } +#nullable restore +#else + public string NativeCaption { get; set; } +#endif + /// The pages property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Pages { get; set; } +#nullable restore +#else + public UntypedNode Pages { get; set; } +#endif + /// The product_code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProductCode { get; set; } +#nullable restore +#else + public string ProductCode { get; set; } +#endif + /// The published property + public DateTimeOffset? Published { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MagazineIssueDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MagazineIssueDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MagazineIssueDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "caption", n => { Caption = n.GetStringValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "issue_number", n => { IssueNumber = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "magazine_id", n => { MagazineId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "magazine_title", n => { MagazineTitle = n.GetStringValue(); } }, + { "native_caption", n => { NativeCaption = n.GetStringValue(); } }, + { "pages", n => { Pages = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "product_code", n => { ProductCode = n.GetStringValue(); } }, + { "published", n => { Published = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("caption", Caption); + writer.WriteObjectValue("id", Id); + writer.WriteObjectValue("issue_number", IssueNumber); + writer.WriteObjectValue("magazine_id", MagazineId); + writer.WriteStringValue("magazine_title", MagazineTitle); + writer.WriteStringValue("native_caption", NativeCaption); + writer.WriteObjectValue("pages", Pages); + writer.WriteStringValue("product_code", ProductCode); + writer.WriteDateTimeOffsetValue("published", Published); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MagazineScanDto.cs b/Marechai.App/Services/Client/Models/MagazineScanDto.cs new file mode 100644 index 00000000..cad2afd9 --- /dev/null +++ b/Marechai.App/Services/Client/Models/MagazineScanDto.cs @@ -0,0 +1,371 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MagazineScanDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The author property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Author { get; set; } +#nullable restore +#else + public string Author { get; set; } +#endif + /// The colorspace property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MagazineScanDto.MagazineScanDto_colorspace? Colorspace { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MagazineScanDto.MagazineScanDto_colorspace Colorspace { get; set; } +#endif + /// The comments property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Comments { get; set; } +#nullable restore +#else + public string Comments { get; set; } +#endif + /// The creation_date property + public DateTimeOffset? CreationDate { get; set; } + /// The exif_version property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ExifVersion { get; set; } +#nullable restore +#else + public string ExifVersion { get; set; } +#endif + /// The horizontal_resolution property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? HorizontalResolution { get; set; } +#nullable restore +#else + public UntypedNode HorizontalResolution { get; set; } +#endif + /// The id property + public Guid? Id { get; set; } + /// The magazine property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Magazine { get; set; } +#nullable restore +#else + public string Magazine { get; set; } +#endif + /// The magazine_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MagazineId { get; set; } +#nullable restore +#else + public UntypedNode MagazineId { get; set; } +#endif + /// The original_extension property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OriginalExtension { get; set; } +#nullable restore +#else + public string OriginalExtension { get; set; } +#endif + /// The page property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Page { get; set; } +#nullable restore +#else + public UntypedNode Page { get; set; } +#endif + /// The resolution_unit property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MagazineScanDto.MagazineScanDto_resolution_unit? ResolutionUnit { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MagazineScanDto.MagazineScanDto_resolution_unit ResolutionUnit { get; set; } +#endif + /// The scanner_manufacturer property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ScannerManufacturer { get; set; } +#nullable restore +#else + public string ScannerManufacturer { get; set; } +#endif + /// The scanner_model property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ScannerModel { get; set; } +#nullable restore +#else + public string ScannerModel { get; set; } +#endif + /// The software property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Software { get; set; } +#nullable restore +#else + public string Software { get; set; } +#endif + /// The type property + public int? Type { get; set; } + /// The upload_date property + public DateTimeOffset? UploadDate { get; set; } + /// The user_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserId { get; set; } +#nullable restore +#else + public string UserId { get; set; } +#endif + /// The vertical_resolution property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? VerticalResolution { get; set; } +#nullable restore +#else + public UntypedNode VerticalResolution { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MagazineScanDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MagazineScanDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MagazineScanDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "author", n => { Author = n.GetStringValue(); } }, + { "colorspace", n => { Colorspace = n.GetObjectValue(global::Marechai.App.Models.MagazineScanDto.MagazineScanDto_colorspace.CreateFromDiscriminatorValue); } }, + { "comments", n => { Comments = n.GetStringValue(); } }, + { "creation_date", n => { CreationDate = n.GetDateTimeOffsetValue(); } }, + { "exif_version", n => { ExifVersion = n.GetStringValue(); } }, + { "horizontal_resolution", n => { HorizontalResolution = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetGuidValue(); } }, + { "magazine", n => { Magazine = n.GetStringValue(); } }, + { "magazine_id", n => { MagazineId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "original_extension", n => { OriginalExtension = n.GetStringValue(); } }, + { "page", n => { Page = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "resolution_unit", n => { ResolutionUnit = n.GetObjectValue(global::Marechai.App.Models.MagazineScanDto.MagazineScanDto_resolution_unit.CreateFromDiscriminatorValue); } }, + { "scanner_manufacturer", n => { ScannerManufacturer = n.GetStringValue(); } }, + { "scanner_model", n => { ScannerModel = n.GetStringValue(); } }, + { "software", n => { Software = n.GetStringValue(); } }, + { "type", n => { Type = n.GetIntValue(); } }, + { "upload_date", n => { UploadDate = n.GetDateTimeOffsetValue(); } }, + { "user_id", n => { UserId = n.GetStringValue(); } }, + { "vertical_resolution", n => { VerticalResolution = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("author", Author); + writer.WriteObjectValue("colorspace", Colorspace); + writer.WriteStringValue("comments", Comments); + writer.WriteDateTimeOffsetValue("creation_date", CreationDate); + writer.WriteStringValue("exif_version", ExifVersion); + writer.WriteObjectValue("horizontal_resolution", HorizontalResolution); + writer.WriteGuidValue("id", Id); + writer.WriteStringValue("magazine", Magazine); + writer.WriteObjectValue("magazine_id", MagazineId); + writer.WriteStringValue("original_extension", OriginalExtension); + writer.WriteObjectValue("page", Page); + writer.WriteObjectValue("resolution_unit", ResolutionUnit); + writer.WriteStringValue("scanner_manufacturer", ScannerManufacturer); + writer.WriteStringValue("scanner_model", ScannerModel); + writer.WriteStringValue("software", Software); + writer.WriteIntValue("type", Type); + writer.WriteDateTimeOffsetValue("upload_date", UploadDate); + writer.WriteStringValue("user_id", UserId); + writer.WriteObjectValue("vertical_resolution", VerticalResolution); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MagazineScanDto_colorspace : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ColorSpace? ColorSpace { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ColorSpace ColorSpace { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MagazineScanDto_colorspaceMember1? MagazineScanDtoColorspaceMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MagazineScanDto_colorspaceMember1 MagazineScanDtoColorspaceMember1 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MagazineScanDto.MagazineScanDto_colorspace CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.MagazineScanDto.MagazineScanDto_colorspace(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ColorSpace = new global::Marechai.App.Models.ColorSpace(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.MagazineScanDtoColorspaceMember1 = new global::Marechai.App.Models.MagazineScanDto_colorspaceMember1(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(ColorSpace != null) + { + return ColorSpace.GetFieldDeserializers(); + } + else if(MagazineScanDtoColorspaceMember1 != null) + { + return MagazineScanDtoColorspaceMember1.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(ColorSpace != null) + { + writer.WriteObjectValue(null, ColorSpace); + } + else if(MagazineScanDtoColorspaceMember1 != null) + { + writer.WriteObjectValue(null, MagazineScanDtoColorspaceMember1); + } + } + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MagazineScanDto_resolution_unit : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MagazineScanDto_resolution_unitMember1? MagazineScanDtoResolutionUnitMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MagazineScanDto_resolution_unitMember1 MagazineScanDtoResolutionUnitMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ResolutionUnit? ResolutionUnit { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ResolutionUnit ResolutionUnit { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MagazineScanDto.MagazineScanDto_resolution_unit CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.MagazineScanDto.MagazineScanDto_resolution_unit(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.MagazineScanDtoResolutionUnitMember1 = new global::Marechai.App.Models.MagazineScanDto_resolution_unitMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ResolutionUnit = new global::Marechai.App.Models.ResolutionUnit(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(MagazineScanDtoResolutionUnitMember1 != null) + { + return MagazineScanDtoResolutionUnitMember1.GetFieldDeserializers(); + } + else if(ResolutionUnit != null) + { + return ResolutionUnit.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(MagazineScanDtoResolutionUnitMember1 != null) + { + writer.WriteObjectValue(null, MagazineScanDtoResolutionUnitMember1); + } + else if(ResolutionUnit != null) + { + writer.WriteObjectValue(null, ResolutionUnit); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MagazineScanDto_colorspaceMember1.cs b/Marechai.App/Services/Client/Models/MagazineScanDto_colorspaceMember1.cs new file mode 100644 index 00000000..8b205317 --- /dev/null +++ b/Marechai.App/Services/Client/Models/MagazineScanDto_colorspaceMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MagazineScanDto_colorspaceMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MagazineScanDto_colorspaceMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MagazineScanDto_colorspaceMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MagazineScanDto_colorspaceMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MagazineScanDto_resolution_unitMember1.cs b/Marechai.App/Services/Client/Models/MagazineScanDto_resolution_unitMember1.cs new file mode 100644 index 00000000..8775ba72 --- /dev/null +++ b/Marechai.App/Services/Client/Models/MagazineScanDto_resolution_unitMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MagazineScanDto_resolution_unitMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MagazineScanDto_resolution_unitMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MagazineScanDto_resolution_unitMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MagazineScanDto_resolution_unitMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MediaDto.cs b/Marechai.App/Services/Client/Models/MediaDto.cs new file mode 100644 index 00000000..7730dfce --- /dev/null +++ b/Marechai.App/Services/Client/Models/MediaDto.cs @@ -0,0 +1,384 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MediaDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The barcode property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Barcode { get; set; } +#nullable restore +#else + public string Barcode { get; set; } +#endif + /// The block_sizes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? BlockSizes { get; set; } +#nullable restore +#else + public List BlockSizes { get; set; } +#endif + /// The catalogue_number property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CatalogueNumber { get; set; } +#nullable restore +#else + public string CatalogueNumber { get; set; } +#endif + /// The copy_protection property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CopyProtection { get; set; } +#nullable restore +#else + public string CopyProtection { get; set; } +#endif + /// The firmware property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Firmware { get; set; } +#nullable restore +#else + public string Firmware { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The last_sequence property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? LastSequence { get; set; } +#nullable restore +#else + public UntypedNode LastSequence { get; set; } +#endif + /// The layers property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Layers { get; set; } +#nullable restore +#else + public UntypedNode Layers { get; set; } +#endif + /// The logical_block_size property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? LogicalBlockSize { get; set; } +#nullable restore +#else + public UntypedNode LogicalBlockSize { get; set; } +#endif + /// The manufacturer property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Manufacturer { get; set; } +#nullable restore +#else + public string Manufacturer { get; set; } +#endif + /// The model property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Model { get; set; } +#nullable restore +#else + public string Model { get; set; } +#endif + /// The part_number property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PartNumber { get; set; } +#nullable restore +#else + public string PartNumber { get; set; } +#endif + /// The physical_block_size property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? PhysicalBlockSize { get; set; } +#nullable restore +#else + public UntypedNode PhysicalBlockSize { get; set; } +#endif + /// The revision property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Revision { get; set; } +#nullable restore +#else + public string Revision { get; set; } +#endif + /// The sectors property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Sectors { get; set; } +#nullable restore +#else + public UntypedNode Sectors { get; set; } +#endif + /// The sequence property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Sequence { get; set; } +#nullable restore +#else + public UntypedNode Sequence { get; set; } +#endif + /// The serial_number property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SerialNumber { get; set; } +#nullable restore +#else + public string SerialNumber { get; set; } +#endif + /// The sessions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Sessions { get; set; } +#nullable restore +#else + public UntypedNode Sessions { get; set; } +#endif + /// The sides property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Sides { get; set; } +#nullable restore +#else + public UntypedNode Sides { get; set; } +#endif + /// The size property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Size { get; set; } +#nullable restore +#else + public UntypedNode Size { get; set; } +#endif + /// The storage_interface property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MediaDto.MediaDto_storage_interface? StorageInterface { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MediaDto.MediaDto_storage_interface StorageInterface { get; set; } +#endif + /// The table_of_contents property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? TableOfContents { get; set; } +#nullable restore +#else + public List TableOfContents { get; set; } +#endif + /// The title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// The tracks property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Tracks { get; set; } +#nullable restore +#else + public UntypedNode Tracks { get; set; } +#endif + /// The type property + public int? Type { get; set; } + /// The write_offset property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? WriteOffset { get; set; } +#nullable restore +#else + public UntypedNode WriteOffset { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public MediaDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MediaDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MediaDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "barcode", n => { Barcode = n.GetStringValue(); } }, + { "block_sizes", n => { BlockSizes = n.GetCollectionOfObjectValues(global::Marechai.App.Models.VariableBlockSize.CreateFromDiscriminatorValue)?.AsList(); } }, + { "catalogue_number", n => { CatalogueNumber = n.GetStringValue(); } }, + { "copy_protection", n => { CopyProtection = n.GetStringValue(); } }, + { "firmware", n => { Firmware = n.GetStringValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "last_sequence", n => { LastSequence = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "layers", n => { Layers = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "logical_block_size", n => { LogicalBlockSize = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "manufacturer", n => { Manufacturer = n.GetStringValue(); } }, + { "model", n => { Model = n.GetStringValue(); } }, + { "part_number", n => { PartNumber = n.GetStringValue(); } }, + { "physical_block_size", n => { PhysicalBlockSize = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "revision", n => { Revision = n.GetStringValue(); } }, + { "sectors", n => { Sectors = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "sequence", n => { Sequence = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "serial_number", n => { SerialNumber = n.GetStringValue(); } }, + { "sessions", n => { Sessions = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "sides", n => { Sides = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "size", n => { Size = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "storage_interface", n => { StorageInterface = n.GetObjectValue(global::Marechai.App.Models.MediaDto.MediaDto_storage_interface.CreateFromDiscriminatorValue); } }, + { "table_of_contents", n => { TableOfContents = n.GetCollectionOfObjectValues(global::Marechai.App.Models.OpticalDiscTrack.CreateFromDiscriminatorValue)?.AsList(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "tracks", n => { Tracks = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetIntValue(); } }, + { "write_offset", n => { WriteOffset = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("barcode", Barcode); + writer.WriteCollectionOfObjectValues("block_sizes", BlockSizes); + writer.WriteStringValue("catalogue_number", CatalogueNumber); + writer.WriteStringValue("copy_protection", CopyProtection); + writer.WriteStringValue("firmware", Firmware); + writer.WriteObjectValue("id", Id); + writer.WriteObjectValue("last_sequence", LastSequence); + writer.WriteObjectValue("layers", Layers); + writer.WriteObjectValue("logical_block_size", LogicalBlockSize); + writer.WriteStringValue("manufacturer", Manufacturer); + writer.WriteStringValue("model", Model); + writer.WriteStringValue("part_number", PartNumber); + writer.WriteObjectValue("physical_block_size", PhysicalBlockSize); + writer.WriteStringValue("revision", Revision); + writer.WriteObjectValue("sectors", Sectors); + writer.WriteObjectValue("sequence", Sequence); + writer.WriteStringValue("serial_number", SerialNumber); + writer.WriteObjectValue("sessions", Sessions); + writer.WriteObjectValue("sides", Sides); + writer.WriteObjectValue("size", Size); + writer.WriteObjectValue("storage_interface", StorageInterface); + writer.WriteCollectionOfObjectValues("table_of_contents", TableOfContents); + writer.WriteStringValue("title", Title); + writer.WriteObjectValue("tracks", Tracks); + writer.WriteIntValue("type", Type); + writer.WriteObjectValue("write_offset", WriteOffset); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MediaDto_storage_interface : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.MediaDto_storage_interfaceMember1? MediaDtoStorageInterfaceMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.MediaDto_storage_interfaceMember1 MediaDtoStorageInterfaceMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.StorageInterface? StorageInterface { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.StorageInterface StorageInterface { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MediaDto.MediaDto_storage_interface CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.MediaDto.MediaDto_storage_interface(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.MediaDtoStorageInterfaceMember1 = new global::Marechai.App.Models.MediaDto_storage_interfaceMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.StorageInterface = new global::Marechai.App.Models.StorageInterface(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(MediaDtoStorageInterfaceMember1 != null) + { + return MediaDtoStorageInterfaceMember1.GetFieldDeserializers(); + } + else if(StorageInterface != null) + { + return StorageInterface.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(MediaDtoStorageInterfaceMember1 != null) + { + writer.WriteObjectValue(null, MediaDtoStorageInterfaceMember1); + } + else if(StorageInterface != null) + { + writer.WriteObjectValue(null, StorageInterface); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MediaDto_storage_interfaceMember1.cs b/Marechai.App/Services/Client/Models/MediaDto_storage_interfaceMember1.cs new file mode 100644 index 00000000..9c636fb4 --- /dev/null +++ b/Marechai.App/Services/Client/Models/MediaDto_storage_interfaceMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MediaDto_storage_interfaceMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MediaDto_storage_interfaceMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MediaDto_storage_interfaceMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MediaDto_storage_interfaceMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MemoryByMachineDto.cs b/Marechai.App/Services/Client/Models/MemoryByMachineDto.cs new file mode 100644 index 00000000..b84933fb --- /dev/null +++ b/Marechai.App/Services/Client/Models/MemoryByMachineDto.cs @@ -0,0 +1,103 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MemoryByMachineDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The machine_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MachineId { get; set; } +#nullable restore +#else + public UntypedNode MachineId { get; set; } +#endif + /// The size property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Size { get; set; } +#nullable restore +#else + public UntypedNode Size { get; set; } +#endif + /// The speed property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Speed { get; set; } +#nullable restore +#else + public UntypedNode Speed { get; set; } +#endif + /// The type property + public int? Type { get; set; } + /// The usage property + public int? Usage { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MemoryByMachineDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MemoryByMachineDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MemoryByMachineDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "machine_id", n => { MachineId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "size", n => { Size = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "speed", n => { Speed = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetIntValue(); } }, + { "usage", n => { Usage = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("id", Id); + writer.WriteObjectValue("machine_id", MachineId); + writer.WriteObjectValue("size", Size); + writer.WriteObjectValue("speed", Speed); + writer.WriteIntValue("type", Type); + writer.WriteIntValue("usage", Usage); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/MeteringMode.cs b/Marechai.App/Services/Client/Models/MeteringMode.cs new file mode 100644 index 00000000..3ecc2434 --- /dev/null +++ b/Marechai.App/Services/Client/Models/MeteringMode.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MeteringMode : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public MeteringMode() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.MeteringMode CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.MeteringMode(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/NewsDto.cs b/Marechai.App/Services/Client/Models/NewsDto.cs new file mode 100644 index 00000000..1cbdd871 --- /dev/null +++ b/Marechai.App/Services/Client/Models/NewsDto.cs @@ -0,0 +1,113 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NewsDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The affected_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? AffectedId { get; set; } +#nullable restore +#else + public UntypedNode AffectedId { get; set; } +#endif + /// The controller property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Controller { get; set; } +#nullable restore +#else + public string Controller { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The item_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ItemName { get; set; } +#nullable restore +#else + public string ItemName { get; set; } +#endif + /// The text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Text { get; set; } +#nullable restore +#else + public string Text { get; set; } +#endif + /// The timestamp property + public DateTimeOffset? Timestamp { get; set; } + /// The type property + public int? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public NewsDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.NewsDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.NewsDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "affected_id", n => { AffectedId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "controller", n => { Controller = n.GetStringValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "item_name", n => { ItemName = n.GetStringValue(); } }, + { "text", n => { Text = n.GetStringValue(); } }, + { "timestamp", n => { Timestamp = n.GetDateTimeOffsetValue(); } }, + { "type", n => { Type = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("affected_id", AffectedId); + writer.WriteStringValue("controller", Controller); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("item_name", ItemName); + writer.WriteStringValue("text", Text); + writer.WriteDateTimeOffsetValue("timestamp", Timestamp); + writer.WriteIntValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/OpticalDiscTrack.cs b/Marechai.App/Services/Client/Models/OpticalDiscTrack.cs new file mode 100644 index 00000000..3ab4c3e4 --- /dev/null +++ b/Marechai.App/Services/Client/Models/OpticalDiscTrack.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OpticalDiscTrack : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The firstSector property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? FirstSector { get; set; } +#nullable restore +#else + public UntypedNode FirstSector { get; set; } +#endif + /// The lastSector property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? LastSector { get; set; } +#nullable restore +#else + public UntypedNode LastSector { get; set; } +#endif + /// The sessionNumber property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? SessionNumber { get; set; } +#nullable restore +#else + public UntypedNode SessionNumber { get; set; } +#endif + /// The trackNumber property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? TrackNumber { get; set; } +#nullable restore +#else + public UntypedNode TrackNumber { get; set; } +#endif + /// The type property + public int? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public OpticalDiscTrack() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.OpticalDiscTrack CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.OpticalDiscTrack(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "firstSector", n => { FirstSector = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "lastSector", n => { LastSector = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "sessionNumber", n => { SessionNumber = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "trackNumber", n => { TrackNumber = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("firstSector", FirstSector); + writer.WriteObjectValue("lastSector", LastSector); + writer.WriteObjectValue("sessionNumber", SessionNumber); + writer.WriteObjectValue("trackNumber", TrackNumber); + writer.WriteIntValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/Orientation.cs b/Marechai.App/Services/Client/Models/Orientation.cs new file mode 100644 index 00000000..b9a60e86 --- /dev/null +++ b/Marechai.App/Services/Client/Models/Orientation.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Orientation : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Orientation() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.Orientation CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.Orientation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/PersonByBookDto.cs b/Marechai.App/Services/Client/Models/PersonByBookDto.cs new file mode 100644 index 00000000..12c384b8 --- /dev/null +++ b/Marechai.App/Services/Client/Models/PersonByBookDto.cs @@ -0,0 +1,145 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PersonByBookDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The alias property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Alias { get; set; } +#nullable restore +#else + public string Alias { get; set; } +#endif + /// The book_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? BookId { get; set; } +#nullable restore +#else + public UntypedNode BookId { get; set; } +#endif + /// The display_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The person_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? PersonId { get; set; } +#nullable restore +#else + public UntypedNode PersonId { get; set; } +#endif + /// The role property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Role { get; set; } +#nullable restore +#else + public string Role { get; set; } +#endif + /// The role_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RoleId { get; set; } +#nullable restore +#else + public string RoleId { get; set; } +#endif + /// The surname property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Surname { get; set; } +#nullable restore +#else + public string Surname { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PersonByBookDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.PersonByBookDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.PersonByBookDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "alias", n => { Alias = n.GetStringValue(); } }, + { "book_id", n => { BookId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "display_name", n => { DisplayName = n.GetStringValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "person_id", n => { PersonId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "role", n => { Role = n.GetStringValue(); } }, + { "role_id", n => { RoleId = n.GetStringValue(); } }, + { "surname", n => { Surname = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("alias", Alias); + writer.WriteObjectValue("book_id", BookId); + writer.WriteStringValue("display_name", DisplayName); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteObjectValue("person_id", PersonId); + writer.WriteStringValue("role", Role); + writer.WriteStringValue("role_id", RoleId); + writer.WriteStringValue("surname", Surname); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/PersonByDocumentDto.cs b/Marechai.App/Services/Client/Models/PersonByDocumentDto.cs new file mode 100644 index 00000000..d1590b00 --- /dev/null +++ b/Marechai.App/Services/Client/Models/PersonByDocumentDto.cs @@ -0,0 +1,145 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PersonByDocumentDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The alias property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Alias { get; set; } +#nullable restore +#else + public string Alias { get; set; } +#endif + /// The display_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The document_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? DocumentId { get; set; } +#nullable restore +#else + public UntypedNode DocumentId { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The person_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? PersonId { get; set; } +#nullable restore +#else + public UntypedNode PersonId { get; set; } +#endif + /// The role property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Role { get; set; } +#nullable restore +#else + public string Role { get; set; } +#endif + /// The role_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RoleId { get; set; } +#nullable restore +#else + public string RoleId { get; set; } +#endif + /// The surname property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Surname { get; set; } +#nullable restore +#else + public string Surname { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PersonByDocumentDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.PersonByDocumentDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.PersonByDocumentDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "alias", n => { Alias = n.GetStringValue(); } }, + { "display_name", n => { DisplayName = n.GetStringValue(); } }, + { "document_id", n => { DocumentId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "person_id", n => { PersonId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "role", n => { Role = n.GetStringValue(); } }, + { "role_id", n => { RoleId = n.GetStringValue(); } }, + { "surname", n => { Surname = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("alias", Alias); + writer.WriteStringValue("display_name", DisplayName); + writer.WriteObjectValue("document_id", DocumentId); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteObjectValue("person_id", PersonId); + writer.WriteStringValue("role", Role); + writer.WriteStringValue("role_id", RoleId); + writer.WriteStringValue("surname", Surname); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/PersonByMagazineDto.cs b/Marechai.App/Services/Client/Models/PersonByMagazineDto.cs new file mode 100644 index 00000000..7c91198e --- /dev/null +++ b/Marechai.App/Services/Client/Models/PersonByMagazineDto.cs @@ -0,0 +1,145 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PersonByMagazineDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The alias property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Alias { get; set; } +#nullable restore +#else + public string Alias { get; set; } +#endif + /// The display_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The magazine_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MagazineId { get; set; } +#nullable restore +#else + public UntypedNode MagazineId { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The person_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? PersonId { get; set; } +#nullable restore +#else + public UntypedNode PersonId { get; set; } +#endif + /// The role property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Role { get; set; } +#nullable restore +#else + public string Role { get; set; } +#endif + /// The role_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RoleId { get; set; } +#nullable restore +#else + public string RoleId { get; set; } +#endif + /// The surname property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Surname { get; set; } +#nullable restore +#else + public string Surname { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PersonByMagazineDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.PersonByMagazineDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.PersonByMagazineDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "alias", n => { Alias = n.GetStringValue(); } }, + { "display_name", n => { DisplayName = n.GetStringValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "magazine_id", n => { MagazineId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "person_id", n => { PersonId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "role", n => { Role = n.GetStringValue(); } }, + { "role_id", n => { RoleId = n.GetStringValue(); } }, + { "surname", n => { Surname = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("alias", Alias); + writer.WriteStringValue("display_name", DisplayName); + writer.WriteObjectValue("id", Id); + writer.WriteObjectValue("magazine_id", MagazineId); + writer.WriteStringValue("name", Name); + writer.WriteObjectValue("person_id", PersonId); + writer.WriteStringValue("role", Role); + writer.WriteStringValue("role_id", RoleId); + writer.WriteStringValue("surname", Surname); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/PersonDto.cs b/Marechai.App/Services/Client/Models/PersonDto.cs new file mode 100644 index 00000000..557e45c5 --- /dev/null +++ b/Marechai.App/Services/Client/Models/PersonDto.cs @@ -0,0 +1,167 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PersonDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The alias property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Alias { get; set; } +#nullable restore +#else + public string Alias { get; set; } +#endif + /// The birthdate property + public DateTimeOffset? Birthdate { get; set; } + /// The country property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Country { get; set; } +#nullable restore +#else + public string Country { get; set; } +#endif + /// The country_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? CountryId { get; set; } +#nullable restore +#else + public UntypedNode CountryId { get; set; } +#endif + /// The death_date property + public DateTimeOffset? DeathDate { get; set; } + /// The display_name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The facebook property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Facebook { get; set; } +#nullable restore +#else + public string Facebook { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The photo property + public Guid? Photo { get; set; } + /// The surname property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Surname { get; set; } +#nullable restore +#else + public string Surname { get; set; } +#endif + /// The twitter property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Twitter { get; set; } +#nullable restore +#else + public string Twitter { get; set; } +#endif + /// The webpage property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Webpage { get; set; } +#nullable restore +#else + public string Webpage { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PersonDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.PersonDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.PersonDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "alias", n => { Alias = n.GetStringValue(); } }, + { "birthdate", n => { Birthdate = n.GetDateTimeOffsetValue(); } }, + { "country", n => { Country = n.GetStringValue(); } }, + { "country_id", n => { CountryId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "death_date", n => { DeathDate = n.GetDateTimeOffsetValue(); } }, + { "display_name", n => { DisplayName = n.GetStringValue(); } }, + { "facebook", n => { Facebook = n.GetStringValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "photo", n => { Photo = n.GetGuidValue(); } }, + { "surname", n => { Surname = n.GetStringValue(); } }, + { "twitter", n => { Twitter = n.GetStringValue(); } }, + { "webpage", n => { Webpage = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("alias", Alias); + writer.WriteDateTimeOffsetValue("birthdate", Birthdate); + writer.WriteStringValue("country", Country); + writer.WriteObjectValue("country_id", CountryId); + writer.WriteDateTimeOffsetValue("death_date", DeathDate); + writer.WriteStringValue("display_name", DisplayName); + writer.WriteStringValue("facebook", Facebook); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteGuidValue("photo", Photo); + writer.WriteStringValue("surname", Surname); + writer.WriteStringValue("twitter", Twitter); + writer.WriteStringValue("webpage", Webpage); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/ProblemDetails.cs b/Marechai.App/Services/Client/Models/ProblemDetails.cs new file mode 100644 index 00000000..bd152434 --- /dev/null +++ b/Marechai.App/Services/Client/Models/ProblemDetails.cs @@ -0,0 +1,108 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProblemDetails : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The detail property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Detail { get; set; } +#nullable restore +#else + public string Detail { get; set; } +#endif + /// The instance property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Instance { get; set; } +#nullable restore +#else + public string Instance { get; set; } +#endif + /// The primary error message. + public override string Message { get => base.Message; } + /// The status property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Status { get; set; } +#nullable restore +#else + public UntypedNode Status { get; set; } +#endif + /// The title property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProblemDetails() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.ProblemDetails CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.ProblemDetails(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "detail", n => { Detail = n.GetStringValue(); } }, + { "instance", n => { Instance = n.GetStringValue(); } }, + { "status", n => { Status = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("detail", Detail); + writer.WriteStringValue("instance", Instance); + writer.WriteObjectValue("status", Status); + writer.WriteStringValue("title", Title); + writer.WriteStringValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/ProcessorByMachineDto.cs b/Marechai.App/Services/Client/Models/ProcessorByMachineDto.cs new file mode 100644 index 00000000..b604baa3 --- /dev/null +++ b/Marechai.App/Services/Client/Models/ProcessorByMachineDto.cs @@ -0,0 +1,115 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProcessorByMachineDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The company property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The machine_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MachineId { get; set; } +#nullable restore +#else + public UntypedNode MachineId { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The processor_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? ProcessorId { get; set; } +#nullable restore +#else + public UntypedNode ProcessorId { get; set; } +#endif + /// The speed property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Speed { get; set; } +#nullable restore +#else + public UntypedNode Speed { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProcessorByMachineDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.ProcessorByMachineDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.ProcessorByMachineDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "company", n => { Company = n.GetStringValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "machine_id", n => { MachineId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "processor_id", n => { ProcessorId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "speed", n => { Speed = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("company", Company); + writer.WriteObjectValue("id", Id); + writer.WriteObjectValue("machine_id", MachineId); + writer.WriteStringValue("name", Name); + writer.WriteObjectValue("processor_id", ProcessorId); + writer.WriteObjectValue("speed", Speed); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/ProcessorDto.cs b/Marechai.App/Services/Client/Models/ProcessorDto.cs new file mode 100644 index 00000000..ff9047b8 --- /dev/null +++ b/Marechai.App/Services/Client/Models/ProcessorDto.cs @@ -0,0 +1,339 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProcessorDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The address_bus property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? AddressBus { get; set; } +#nullable restore +#else + public UntypedNode AddressBus { get; set; } +#endif + /// The company property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The company_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? CompanyId { get; set; } +#nullable restore +#else + public UntypedNode CompanyId { get; set; } +#endif + /// The cores property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Cores { get; set; } +#nullable restore +#else + public UntypedNode Cores { get; set; } +#endif + /// The data_bus property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? DataBus { get; set; } +#nullable restore +#else + public UntypedNode DataBus { get; set; } +#endif + /// The die_size property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? DieSize { get; set; } +#nullable restore +#else + public UntypedNode DieSize { get; set; } +#endif + /// The fprs property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Fprs { get; set; } +#nullable restore +#else + public UntypedNode Fprs { get; set; } +#endif + /// The fpr_size property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? FprSize { get; set; } +#nullable restore +#else + public UntypedNode FprSize { get; set; } +#endif + /// The gprs property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Gprs { get; set; } +#nullable restore +#else + public UntypedNode Gprs { get; set; } +#endif + /// The gpr_size property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? GprSize { get; set; } +#nullable restore +#else + public UntypedNode GprSize { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The instruction_set property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? InstructionSet { get; set; } +#nullable restore +#else + public string InstructionSet { get; set; } +#endif + /// The instruction_set_extensions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? InstructionSetExtensions { get; set; } +#nullable restore +#else + public List InstructionSetExtensions { get; set; } +#endif + /// The instruction_set_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? InstructionSetId { get; set; } +#nullable restore +#else + public UntypedNode InstructionSetId { get; set; } +#endif + /// The introduced property + public DateTimeOffset? Introduced { get; set; } + /// The l1_data property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? L1Data { get; set; } +#nullable restore +#else + public UntypedNode L1Data { get; set; } +#endif + /// The l1_instruction property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? L1Instruction { get; set; } +#nullable restore +#else + public UntypedNode L1Instruction { get; set; } +#endif + /// The l2 property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? L2 { get; set; } +#nullable restore +#else + public UntypedNode L2 { get; set; } +#endif + /// The l3 property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? L3 { get; set; } +#nullable restore +#else + public UntypedNode L3 { get; set; } +#endif + /// The model_code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ModelCode { get; set; } +#nullable restore +#else + public string ModelCode { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The package property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Package { get; set; } +#nullable restore +#else + public string Package { get; set; } +#endif + /// The process property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Process { get; set; } +#nullable restore +#else + public string Process { get; set; } +#endif + /// The process_nm property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? ProcessNm { get; set; } +#nullable restore +#else + public UntypedNode ProcessNm { get; set; } +#endif + /// The simd_registers property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? SimdRegisters { get; set; } +#nullable restore +#else + public UntypedNode SimdRegisters { get; set; } +#endif + /// The simd_size property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? SimdSize { get; set; } +#nullable restore +#else + public UntypedNode SimdSize { get; set; } +#endif + /// The speed property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Speed { get; set; } +#nullable restore +#else + public UntypedNode Speed { get; set; } +#endif + /// The threads_per_core property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? ThreadsPerCore { get; set; } +#nullable restore +#else + public UntypedNode ThreadsPerCore { get; set; } +#endif + /// The transistors property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Transistors { get; set; } +#nullable restore +#else + public UntypedNode Transistors { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ProcessorDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.ProcessorDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.ProcessorDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "address_bus", n => { AddressBus = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "company", n => { Company = n.GetStringValue(); } }, + { "company_id", n => { CompanyId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "cores", n => { Cores = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "data_bus", n => { DataBus = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "die_size", n => { DieSize = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "fpr_size", n => { FprSize = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "fprs", n => { Fprs = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "gpr_size", n => { GprSize = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "gprs", n => { Gprs = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "instruction_set", n => { InstructionSet = n.GetStringValue(); } }, + { "instruction_set_extensions", n => { InstructionSetExtensions = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "instruction_set_id", n => { InstructionSetId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "introduced", n => { Introduced = n.GetDateTimeOffsetValue(); } }, + { "l1_data", n => { L1Data = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "l1_instruction", n => { L1Instruction = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "l2", n => { L2 = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "l3", n => { L3 = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "model_code", n => { ModelCode = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "package", n => { Package = n.GetStringValue(); } }, + { "process", n => { Process = n.GetStringValue(); } }, + { "process_nm", n => { ProcessNm = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "simd_registers", n => { SimdRegisters = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "simd_size", n => { SimdSize = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "speed", n => { Speed = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "threads_per_core", n => { ThreadsPerCore = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "transistors", n => { Transistors = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("address_bus", AddressBus); + writer.WriteStringValue("company", Company); + writer.WriteObjectValue("company_id", CompanyId); + writer.WriteObjectValue("cores", Cores); + writer.WriteObjectValue("data_bus", DataBus); + writer.WriteObjectValue("die_size", DieSize); + writer.WriteObjectValue("fprs", Fprs); + writer.WriteObjectValue("fpr_size", FprSize); + writer.WriteObjectValue("gprs", Gprs); + writer.WriteObjectValue("gpr_size", GprSize); + writer.WriteObjectValue("id", Id); + writer.WriteStringValue("instruction_set", InstructionSet); + writer.WriteCollectionOfPrimitiveValues("instruction_set_extensions", InstructionSetExtensions); + writer.WriteObjectValue("instruction_set_id", InstructionSetId); + writer.WriteDateTimeOffsetValue("introduced", Introduced); + writer.WriteObjectValue("l1_data", L1Data); + writer.WriteObjectValue("l1_instruction", L1Instruction); + writer.WriteObjectValue("l2", L2); + writer.WriteObjectValue("l3", L3); + writer.WriteStringValue("model_code", ModelCode); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("package", Package); + writer.WriteStringValue("process", Process); + writer.WriteObjectValue("process_nm", ProcessNm); + writer.WriteObjectValue("simd_registers", SimdRegisters); + writer.WriteObjectValue("simd_size", SimdSize); + writer.WriteObjectValue("speed", Speed); + writer.WriteObjectValue("threads_per_core", ThreadsPerCore); + writer.WriteObjectValue("transistors", Transistors); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/ResolutionByGpuDto.cs b/Marechai.App/Services/Client/Models/ResolutionByGpuDto.cs new file mode 100644 index 00000000..5efcf7d4 --- /dev/null +++ b/Marechai.App/Services/Client/Models/ResolutionByGpuDto.cs @@ -0,0 +1,170 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ResolutionByGpuDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The gpu_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? GpuId { get; set; } +#nullable restore +#else + public UntypedNode GpuId { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The resolution property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ResolutionByGpuDto.ResolutionByGpuDto_resolution? Resolution { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ResolutionByGpuDto.ResolutionByGpuDto_resolution Resolution { get; set; } +#endif + /// The resolution_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? ResolutionId { get; set; } +#nullable restore +#else + public UntypedNode ResolutionId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ResolutionByGpuDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.ResolutionByGpuDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.ResolutionByGpuDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "gpu_id", n => { GpuId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "resolution", n => { Resolution = n.GetObjectValue(global::Marechai.App.Models.ResolutionByGpuDto.ResolutionByGpuDto_resolution.CreateFromDiscriminatorValue); } }, + { "resolution_id", n => { ResolutionId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("gpu_id", GpuId); + writer.WriteObjectValue("id", Id); + writer.WriteObjectValue("resolution", Resolution); + writer.WriteObjectValue("resolution_id", ResolutionId); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionByGpuDto_resolution : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ResolutionByGpuDto_resolutionMember1? ResolutionByGpuDtoResolutionMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ResolutionByGpuDto_resolutionMember1 ResolutionByGpuDtoResolutionMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ResolutionDto? ResolutionDto { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ResolutionDto ResolutionDto { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.ResolutionByGpuDto.ResolutionByGpuDto_resolution CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.ResolutionByGpuDto.ResolutionByGpuDto_resolution(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ResolutionByGpuDtoResolutionMember1 = new global::Marechai.App.Models.ResolutionByGpuDto_resolutionMember1(); + } + else if("ResolutionDto".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ResolutionDto = new global::Marechai.App.Models.ResolutionDto(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(ResolutionByGpuDtoResolutionMember1 != null) + { + return ResolutionByGpuDtoResolutionMember1.GetFieldDeserializers(); + } + else if(ResolutionDto != null) + { + return ResolutionDto.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(ResolutionByGpuDtoResolutionMember1 != null) + { + writer.WriteObjectValue(null, ResolutionByGpuDtoResolutionMember1); + } + else if(ResolutionDto != null) + { + writer.WriteObjectValue(null, ResolutionDto); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/ResolutionByGpuDto_resolutionMember1.cs b/Marechai.App/Services/Client/Models/ResolutionByGpuDto_resolutionMember1.cs new file mode 100644 index 00000000..72b4e1d1 --- /dev/null +++ b/Marechai.App/Services/Client/Models/ResolutionByGpuDto_resolutionMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ResolutionByGpuDto_resolutionMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ResolutionByGpuDto_resolutionMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.ResolutionByGpuDto_resolutionMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.ResolutionByGpuDto_resolutionMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/ResolutionByScreenDto.cs b/Marechai.App/Services/Client/Models/ResolutionByScreenDto.cs new file mode 100644 index 00000000..9db2acc6 --- /dev/null +++ b/Marechai.App/Services/Client/Models/ResolutionByScreenDto.cs @@ -0,0 +1,170 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ResolutionByScreenDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The resolution property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ResolutionByScreenDto.ResolutionByScreenDto_resolution? Resolution { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ResolutionByScreenDto.ResolutionByScreenDto_resolution Resolution { get; set; } +#endif + /// The resolution_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? ResolutionId { get; set; } +#nullable restore +#else + public UntypedNode ResolutionId { get; set; } +#endif + /// The screen_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? ScreenId { get; set; } +#nullable restore +#else + public UntypedNode ScreenId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ResolutionByScreenDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.ResolutionByScreenDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.ResolutionByScreenDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "resolution", n => { Resolution = n.GetObjectValue(global::Marechai.App.Models.ResolutionByScreenDto.ResolutionByScreenDto_resolution.CreateFromDiscriminatorValue); } }, + { "resolution_id", n => { ResolutionId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "screen_id", n => { ScreenId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("id", Id); + writer.WriteObjectValue("resolution", Resolution); + writer.WriteObjectValue("resolution_id", ResolutionId); + writer.WriteObjectValue("screen_id", ScreenId); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionByScreenDto_resolution : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ResolutionByScreenDto_resolutionMember1? ResolutionByScreenDtoResolutionMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ResolutionByScreenDto_resolutionMember1 ResolutionByScreenDtoResolutionMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ResolutionDto? ResolutionDto { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ResolutionDto ResolutionDto { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.ResolutionByScreenDto.ResolutionByScreenDto_resolution CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.ResolutionByScreenDto.ResolutionByScreenDto_resolution(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ResolutionByScreenDtoResolutionMember1 = new global::Marechai.App.Models.ResolutionByScreenDto_resolutionMember1(); + } + else if("ResolutionDto".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ResolutionDto = new global::Marechai.App.Models.ResolutionDto(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(ResolutionByScreenDtoResolutionMember1 != null) + { + return ResolutionByScreenDtoResolutionMember1.GetFieldDeserializers(); + } + else if(ResolutionDto != null) + { + return ResolutionDto.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(ResolutionByScreenDtoResolutionMember1 != null) + { + writer.WriteObjectValue(null, ResolutionByScreenDtoResolutionMember1); + } + else if(ResolutionDto != null) + { + writer.WriteObjectValue(null, ResolutionDto); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/ResolutionByScreenDto_resolutionMember1.cs b/Marechai.App/Services/Client/Models/ResolutionByScreenDto_resolutionMember1.cs new file mode 100644 index 00000000..42727d69 --- /dev/null +++ b/Marechai.App/Services/Client/Models/ResolutionByScreenDto_resolutionMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ResolutionByScreenDto_resolutionMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ResolutionByScreenDto_resolutionMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.ResolutionByScreenDto_resolutionMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.ResolutionByScreenDto_resolutionMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/ResolutionDto.cs b/Marechai.App/Services/Client/Models/ResolutionDto.cs new file mode 100644 index 00000000..f4043537 --- /dev/null +++ b/Marechai.App/Services/Client/Models/ResolutionDto.cs @@ -0,0 +1,113 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ResolutionDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The chars property + public bool? Chars { get; set; } + /// The colors property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Colors { get; set; } +#nullable restore +#else + public UntypedNode Colors { get; set; } +#endif + /// The grayscale property + public bool? Grayscale { get; set; } + /// The height property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Height { get; set; } +#nullable restore +#else + public UntypedNode Height { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The palette property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Palette { get; set; } +#nullable restore +#else + public UntypedNode Palette { get; set; } +#endif + /// The width property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Width { get; set; } +#nullable restore +#else + public UntypedNode Width { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ResolutionDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.ResolutionDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.ResolutionDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "chars", n => { Chars = n.GetBoolValue(); } }, + { "colors", n => { Colors = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "grayscale", n => { Grayscale = n.GetBoolValue(); } }, + { "height", n => { Height = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "palette", n => { Palette = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "width", n => { Width = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("chars", Chars); + writer.WriteObjectValue("colors", Colors); + writer.WriteBoolValue("grayscale", Grayscale); + writer.WriteObjectValue("height", Height); + writer.WriteObjectValue("id", Id); + writer.WriteObjectValue("palette", Palette); + writer.WriteObjectValue("width", Width); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/ResolutionUnit.cs b/Marechai.App/Services/Client/Models/ResolutionUnit.cs new file mode 100644 index 00000000..c142010f --- /dev/null +++ b/Marechai.App/Services/Client/Models/ResolutionUnit.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ResolutionUnit : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ResolutionUnit() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.ResolutionUnit CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.ResolutionUnit(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/Saturation.cs b/Marechai.App/Services/Client/Models/Saturation.cs new file mode 100644 index 00000000..9a54fdc0 --- /dev/null +++ b/Marechai.App/Services/Client/Models/Saturation.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Saturation : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Saturation() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.Saturation CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.Saturation(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/SceneCaptureType.cs b/Marechai.App/Services/Client/Models/SceneCaptureType.cs new file mode 100644 index 00000000..d1a21c36 --- /dev/null +++ b/Marechai.App/Services/Client/Models/SceneCaptureType.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SceneCaptureType : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SceneCaptureType() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.SceneCaptureType CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.SceneCaptureType(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/ScreenByMachineDto.cs b/Marechai.App/Services/Client/Models/ScreenByMachineDto.cs new file mode 100644 index 00000000..603bb3d9 --- /dev/null +++ b/Marechai.App/Services/Client/Models/ScreenByMachineDto.cs @@ -0,0 +1,170 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ScreenByMachineDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The machine_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MachineId { get; set; } +#nullable restore +#else + public UntypedNode MachineId { get; set; } +#endif + /// The screen property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ScreenByMachineDto.ScreenByMachineDto_screen? Screen { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ScreenByMachineDto.ScreenByMachineDto_screen Screen { get; set; } +#endif + /// The screen_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? ScreenId { get; set; } +#nullable restore +#else + public UntypedNode ScreenId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ScreenByMachineDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.ScreenByMachineDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.ScreenByMachineDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "machine_id", n => { MachineId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "screen", n => { Screen = n.GetObjectValue(global::Marechai.App.Models.ScreenByMachineDto.ScreenByMachineDto_screen.CreateFromDiscriminatorValue); } }, + { "screen_id", n => { ScreenId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("id", Id); + writer.WriteObjectValue("machine_id", MachineId); + writer.WriteObjectValue("screen", Screen); + writer.WriteObjectValue("screen_id", ScreenId); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScreenByMachineDto_screen : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ScreenByMachineDto_screenMember1? ScreenByMachineDtoScreenMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ScreenByMachineDto_screenMember1 ScreenByMachineDtoScreenMember1 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ScreenDto? ScreenDto { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ScreenDto ScreenDto { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.ScreenByMachineDto.ScreenByMachineDto_screen CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.ScreenByMachineDto.ScreenByMachineDto_screen(); + if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ScreenByMachineDtoScreenMember1 = new global::Marechai.App.Models.ScreenByMachineDto_screenMember1(); + } + else if("ScreenDto".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ScreenDto = new global::Marechai.App.Models.ScreenDto(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(ScreenByMachineDtoScreenMember1 != null) + { + return ScreenByMachineDtoScreenMember1.GetFieldDeserializers(); + } + else if(ScreenDto != null) + { + return ScreenDto.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(ScreenByMachineDtoScreenMember1 != null) + { + writer.WriteObjectValue(null, ScreenByMachineDtoScreenMember1); + } + else if(ScreenDto != null) + { + writer.WriteObjectValue(null, ScreenDto); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/ScreenByMachineDto_screenMember1.cs b/Marechai.App/Services/Client/Models/ScreenByMachineDto_screenMember1.cs new file mode 100644 index 00000000..8aa0e860 --- /dev/null +++ b/Marechai.App/Services/Client/Models/ScreenByMachineDto_screenMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ScreenByMachineDto_screenMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ScreenByMachineDto_screenMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.ScreenByMachineDto_screenMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.ScreenByMachineDto_screenMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/ScreenDto.cs b/Marechai.App/Services/Client/Models/ScreenDto.cs new file mode 100644 index 00000000..59759c1d --- /dev/null +++ b/Marechai.App/Services/Client/Models/ScreenDto.cs @@ -0,0 +1,220 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ScreenDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The diagonal property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Diagonal { get; set; } +#nullable restore +#else + public UntypedNode Diagonal { get; set; } +#endif + /// The effective_colors property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? EffectiveColors { get; set; } +#nullable restore +#else + public UntypedNode EffectiveColors { get; set; } +#endif + /// The height property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Height { get; set; } +#nullable restore +#else + public UntypedNode Height { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The native_resolution property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ScreenDto.ScreenDto_native_resolution? NativeResolution { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ScreenDto.ScreenDto_native_resolution NativeResolution { get; set; } +#endif + /// The native_resolution_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? NativeResolutionId { get; set; } +#nullable restore +#else + public UntypedNode NativeResolutionId { get; set; } +#endif + /// The size property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Size { get; set; } +#nullable restore +#else + public string Size { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// The width property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Width { get; set; } +#nullable restore +#else + public UntypedNode Width { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ScreenDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.ScreenDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.ScreenDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "diagonal", n => { Diagonal = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "effective_colors", n => { EffectiveColors = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "height", n => { Height = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "native_resolution", n => { NativeResolution = n.GetObjectValue(global::Marechai.App.Models.ScreenDto.ScreenDto_native_resolution.CreateFromDiscriminatorValue); } }, + { "native_resolution_id", n => { NativeResolutionId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "size", n => { Size = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "width", n => { Width = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("diagonal", Diagonal); + writer.WriteObjectValue("effective_colors", EffectiveColors); + writer.WriteObjectValue("height", Height); + writer.WriteObjectValue("id", Id); + writer.WriteObjectValue("native_resolution", NativeResolution); + writer.WriteObjectValue("native_resolution_id", NativeResolutionId); + writer.WriteStringValue("size", Size); + writer.WriteStringValue("type", Type); + writer.WriteObjectValue("width", Width); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScreenDto_native_resolution : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ResolutionDto? ResolutionDto { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ResolutionDto ResolutionDto { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Marechai.App.Models.ScreenDto_native_resolutionMember1? ScreenDtoNativeResolutionMember1 { get; set; } +#nullable restore +#else + public global::Marechai.App.Models.ScreenDto_native_resolutionMember1 ScreenDtoNativeResolutionMember1 { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.ScreenDto.ScreenDto_native_resolution CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::Marechai.App.Models.ScreenDto.ScreenDto_native_resolution(); + if("ResolutionDto".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ResolutionDto = new global::Marechai.App.Models.ResolutionDto(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.ScreenDtoNativeResolutionMember1 = new global::Marechai.App.Models.ScreenDto_native_resolutionMember1(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(ResolutionDto != null) + { + return ResolutionDto.GetFieldDeserializers(); + } + else if(ScreenDtoNativeResolutionMember1 != null) + { + return ScreenDtoNativeResolutionMember1.GetFieldDeserializers(); + } + return new Dictionary>(); + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + if(ResolutionDto != null) + { + writer.WriteObjectValue(null, ResolutionDto); + } + else if(ScreenDtoNativeResolutionMember1 != null) + { + writer.WriteObjectValue(null, ScreenDtoNativeResolutionMember1); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/ScreenDto_native_resolutionMember1.cs b/Marechai.App/Services/Client/Models/ScreenDto_native_resolutionMember1.cs new file mode 100644 index 00000000..6d9caa1d --- /dev/null +++ b/Marechai.App/Services/Client/Models/ScreenDto_native_resolutionMember1.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ScreenDto_native_resolutionMember1 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ScreenDto_native_resolutionMember1() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.ScreenDto_native_resolutionMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.ScreenDto_native_resolutionMember1(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/SensingMethod.cs b/Marechai.App/Services/Client/Models/SensingMethod.cs new file mode 100644 index 00000000..a848e5f3 --- /dev/null +++ b/Marechai.App/Services/Client/Models/SensingMethod.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SensingMethod : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SensingMethod() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.SensingMethod CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.SensingMethod(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/Sharpness.cs b/Marechai.App/Services/Client/Models/Sharpness.cs new file mode 100644 index 00000000..c110b1ed --- /dev/null +++ b/Marechai.App/Services/Client/Models/Sharpness.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Sharpness : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Sharpness() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.Sharpness CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.Sharpness(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/SoftwareFamilyDto.cs b/Marechai.App/Services/Client/Models/SoftwareFamilyDto.cs new file mode 100644 index 00000000..55e320f9 --- /dev/null +++ b/Marechai.App/Services/Client/Models/SoftwareFamilyDto.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SoftwareFamilyDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The introduced property + public DateTimeOffset? Introduced { get; set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The parent property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Parent { get; set; } +#nullable restore +#else + public string Parent { get; set; } +#endif + /// The parent_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? ParentId { get; set; } +#nullable restore +#else + public UntypedNode ParentId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SoftwareFamilyDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.SoftwareFamilyDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.SoftwareFamilyDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "introduced", n => { Introduced = n.GetDateTimeOffsetValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "parent", n => { Parent = n.GetStringValue(); } }, + { "parent_id", n => { ParentId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("id", Id); + writer.WriteDateTimeOffsetValue("introduced", Introduced); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("parent", Parent); + writer.WriteObjectValue("parent_id", ParentId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/SoftwareVariantDto.cs b/Marechai.App/Services/Client/Models/SoftwareVariantDto.cs new file mode 100644 index 00000000..281b9394 --- /dev/null +++ b/Marechai.App/Services/Client/Models/SoftwareVariantDto.cs @@ -0,0 +1,213 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SoftwareVariantDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The catalogue_number property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CatalogueNumber { get; set; } +#nullable restore +#else + public string CatalogueNumber { get; set; } +#endif + /// The distribution_mode property + public int? DistributionMode { get; set; } + /// The family property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Family { get; set; } +#nullable restore +#else + public string Family { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The introduced property + public DateTimeOffset? Introduced { get; set; } + /// The minimum_memory property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MinimumMemory { get; set; } +#nullable restore +#else + public UntypedNode MinimumMemory { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The parent property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Parent { get; set; } +#nullable restore +#else + public string Parent { get; set; } +#endif + /// The parent_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? ParentId { get; set; } +#nullable restore +#else + public UntypedNode ParentId { get; set; } +#endif + /// The part_number property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PartNumber { get; set; } +#nullable restore +#else + public string PartNumber { get; set; } +#endif + /// The product_code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ProductCode { get; set; } +#nullable restore +#else + public string ProductCode { get; set; } +#endif + /// The recommended_memory property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? RecommendedMemory { get; set; } +#nullable restore +#else + public UntypedNode RecommendedMemory { get; set; } +#endif + /// The required_storage property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? RequiredStorage { get; set; } +#nullable restore +#else + public UntypedNode RequiredStorage { get; set; } +#endif + /// The serial_number property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SerialNumber { get; set; } +#nullable restore +#else + public string SerialNumber { get; set; } +#endif + /// The software_version property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SoftwareVersion { get; set; } +#nullable restore +#else + public string SoftwareVersion { get; set; } +#endif + /// The version property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Version { get; set; } +#nullable restore +#else + public string Version { get; set; } +#endif + /// The version_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? VersionId { get; set; } +#nullable restore +#else + public UntypedNode VersionId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SoftwareVariantDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.SoftwareVariantDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.SoftwareVariantDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "catalogue_number", n => { CatalogueNumber = n.GetStringValue(); } }, + { "distribution_mode", n => { DistributionMode = n.GetIntValue(); } }, + { "family", n => { Family = n.GetStringValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "introduced", n => { Introduced = n.GetDateTimeOffsetValue(); } }, + { "minimum_memory", n => { MinimumMemory = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "parent", n => { Parent = n.GetStringValue(); } }, + { "parent_id", n => { ParentId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "part_number", n => { PartNumber = n.GetStringValue(); } }, + { "product_code", n => { ProductCode = n.GetStringValue(); } }, + { "recommended_memory", n => { RecommendedMemory = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "required_storage", n => { RequiredStorage = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "serial_number", n => { SerialNumber = n.GetStringValue(); } }, + { "software_version", n => { SoftwareVersion = n.GetStringValue(); } }, + { "version", n => { Version = n.GetStringValue(); } }, + { "version_id", n => { VersionId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("catalogue_number", CatalogueNumber); + writer.WriteIntValue("distribution_mode", DistributionMode); + writer.WriteStringValue("family", Family); + writer.WriteObjectValue("id", Id); + writer.WriteDateTimeOffsetValue("introduced", Introduced); + writer.WriteObjectValue("minimum_memory", MinimumMemory); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("parent", Parent); + writer.WriteObjectValue("parent_id", ParentId); + writer.WriteStringValue("part_number", PartNumber); + writer.WriteStringValue("product_code", ProductCode); + writer.WriteObjectValue("recommended_memory", RecommendedMemory); + writer.WriteObjectValue("required_storage", RequiredStorage); + writer.WriteStringValue("serial_number", SerialNumber); + writer.WriteStringValue("software_version", SoftwareVersion); + writer.WriteStringValue("version", Version); + writer.WriteObjectValue("version_id", VersionId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/SoftwareVersionDto.cs b/Marechai.App/Services/Client/Models/SoftwareVersionDto.cs new file mode 100644 index 00000000..c23e6326 --- /dev/null +++ b/Marechai.App/Services/Client/Models/SoftwareVersionDto.cs @@ -0,0 +1,159 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SoftwareVersionDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The codename property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Codename { get; set; } +#nullable restore +#else + public string Codename { get; set; } +#endif + /// The family property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Family { get; set; } +#nullable restore +#else + public string Family { get; set; } +#endif + /// The family_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? FamilyId { get; set; } +#nullable restore +#else + public UntypedNode FamilyId { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The introduced property + public DateTimeOffset? Introduced { get; set; } + /// The license property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? License { get; set; } +#nullable restore +#else + public string License { get; set; } +#endif + /// The license_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? LicenseId { get; set; } +#nullable restore +#else + public UntypedNode LicenseId { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The previous property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Previous { get; set; } +#nullable restore +#else + public string Previous { get; set; } +#endif + /// The previous_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? PreviousId { get; set; } +#nullable restore +#else + public UntypedNode PreviousId { get; set; } +#endif + /// The version property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Version { get; set; } +#nullable restore +#else + public string Version { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SoftwareVersionDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.SoftwareVersionDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.SoftwareVersionDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "codename", n => { Codename = n.GetStringValue(); } }, + { "family", n => { Family = n.GetStringValue(); } }, + { "family_id", n => { FamilyId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "introduced", n => { Introduced = n.GetDateTimeOffsetValue(); } }, + { "license", n => { License = n.GetStringValue(); } }, + { "license_id", n => { LicenseId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "previous", n => { Previous = n.GetStringValue(); } }, + { "previous_id", n => { PreviousId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "version", n => { Version = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("codename", Codename); + writer.WriteStringValue("family", Family); + writer.WriteObjectValue("family_id", FamilyId); + writer.WriteObjectValue("id", Id); + writer.WriteDateTimeOffsetValue("introduced", Introduced); + writer.WriteStringValue("license", License); + writer.WriteObjectValue("license_id", LicenseId); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("previous", Previous); + writer.WriteObjectValue("previous_id", PreviousId); + writer.WriteStringValue("version", Version); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/SoundSynthByMachineDto.cs b/Marechai.App/Services/Client/Models/SoundSynthByMachineDto.cs new file mode 100644 index 00000000..63520819 --- /dev/null +++ b/Marechai.App/Services/Client/Models/SoundSynthByMachineDto.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SoundSynthByMachineDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The company property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The machine_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MachineId { get; set; } +#nullable restore +#else + public UntypedNode MachineId { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The sound_synth_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? SoundSynthId { get; set; } +#nullable restore +#else + public UntypedNode SoundSynthId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SoundSynthByMachineDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.SoundSynthByMachineDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.SoundSynthByMachineDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "company", n => { Company = n.GetStringValue(); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "machine_id", n => { MachineId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "sound_synth_id", n => { SoundSynthId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("company", Company); + writer.WriteObjectValue("id", Id); + writer.WriteObjectValue("machine_id", MachineId); + writer.WriteStringValue("name", Name); + writer.WriteObjectValue("sound_synth_id", SoundSynthId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/SoundSynthDto.cs b/Marechai.App/Services/Client/Models/SoundSynthDto.cs new file mode 100644 index 00000000..621b4a85 --- /dev/null +++ b/Marechai.App/Services/Client/Models/SoundSynthDto.cs @@ -0,0 +1,169 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SoundSynthDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The company property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Company { get; set; } +#nullable restore +#else + public string Company { get; set; } +#endif + /// The company_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? CompanyId { get; set; } +#nullable restore +#else + public UntypedNode CompanyId { get; set; } +#endif + /// The depth property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Depth { get; set; } +#nullable restore +#else + public UntypedNode Depth { get; set; } +#endif + /// The frequency property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Frequency { get; set; } +#nullable restore +#else + public UntypedNode Frequency { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The introduced property + public DateTimeOffset? Introduced { get; set; } + /// The model_code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ModelCode { get; set; } +#nullable restore +#else + public string ModelCode { get; set; } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The square_wave property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? SquareWave { get; set; } +#nullable restore +#else + public UntypedNode SquareWave { get; set; } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Type { get; set; } +#nullable restore +#else + public UntypedNode Type { get; set; } +#endif + /// The voices property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Voices { get; set; } +#nullable restore +#else + public UntypedNode Voices { get; set; } +#endif + /// The white_noise property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? WhiteNoise { get; set; } +#nullable restore +#else + public UntypedNode WhiteNoise { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SoundSynthDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.SoundSynthDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.SoundSynthDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "company", n => { Company = n.GetStringValue(); } }, + { "company_id", n => { CompanyId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "depth", n => { Depth = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "frequency", n => { Frequency = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "introduced", n => { Introduced = n.GetDateTimeOffsetValue(); } }, + { "model_code", n => { ModelCode = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "square_wave", n => { SquareWave = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "voices", n => { Voices = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "white_noise", n => { WhiteNoise = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("company", Company); + writer.WriteObjectValue("company_id", CompanyId); + writer.WriteObjectValue("depth", Depth); + writer.WriteObjectValue("frequency", Frequency); + writer.WriteObjectValue("id", Id); + writer.WriteDateTimeOffsetValue("introduced", Introduced); + writer.WriteStringValue("model_code", ModelCode); + writer.WriteStringValue("name", Name); + writer.WriteObjectValue("square_wave", SquareWave); + writer.WriteObjectValue("type", Type); + writer.WriteObjectValue("voices", Voices); + writer.WriteObjectValue("white_noise", WhiteNoise); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/StorageByMachineDto.cs b/Marechai.App/Services/Client/Models/StorageByMachineDto.cs new file mode 100644 index 00000000..8e88daef --- /dev/null +++ b/Marechai.App/Services/Client/Models/StorageByMachineDto.cs @@ -0,0 +1,93 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class StorageByMachineDto : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The capacity property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Capacity { get; set; } +#nullable restore +#else + public UntypedNode Capacity { get; set; } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Id { get; set; } +#nullable restore +#else + public UntypedNode Id { get; set; } +#endif + /// The interface property + public int? Interface { get; set; } + /// The machine_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? MachineId { get; set; } +#nullable restore +#else + public UntypedNode MachineId { get; set; } +#endif + /// The type property + public int? Type { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public StorageByMachineDto() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.StorageByMachineDto CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.StorageByMachineDto(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "capacity", n => { Capacity = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "interface", n => { Interface = n.GetIntValue(); } }, + { "machine_id", n => { MachineId = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("capacity", Capacity); + writer.WriteObjectValue("id", Id); + writer.WriteIntValue("interface", Interface); + writer.WriteObjectValue("machine_id", MachineId); + writer.WriteIntValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/StorageInterface.cs b/Marechai.App/Services/Client/Models/StorageInterface.cs new file mode 100644 index 00000000..0c443f50 --- /dev/null +++ b/Marechai.App/Services/Client/Models/StorageInterface.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class StorageInterface : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public StorageInterface() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.StorageInterface CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.StorageInterface(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/SubjectDistanceRange.cs b/Marechai.App/Services/Client/Models/SubjectDistanceRange.cs new file mode 100644 index 00000000..51e533b1 --- /dev/null +++ b/Marechai.App/Services/Client/Models/SubjectDistanceRange.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SubjectDistanceRange : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SubjectDistanceRange() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.SubjectDistanceRange CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.SubjectDistanceRange(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/VariableBlockSize.cs b/Marechai.App/Services/Client/Models/VariableBlockSize.cs new file mode 100644 index 00000000..6a0a12af --- /dev/null +++ b/Marechai.App/Services/Client/Models/VariableBlockSize.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class VariableBlockSize : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The end property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? End { get; set; } +#nullable restore +#else + public UntypedNode End { get; set; } +#endif + /// The size property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Size { get; set; } +#nullable restore +#else + public UntypedNode Size { get; set; } +#endif + /// The start property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UntypedNode? Start { get; set; } +#nullable restore +#else + public UntypedNode Start { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public VariableBlockSize() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.VariableBlockSize CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.VariableBlockSize(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "end", n => { End = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "size", n => { Size = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + { "start", n => { Start = n.GetObjectValue(UntypedNode.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("end", End); + writer.WriteObjectValue("size", Size); + writer.WriteObjectValue("start", Start); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Models/WhiteBalance.cs b/Marechai.App/Services/Client/Models/WhiteBalance.cs new file mode 100644 index 00000000..3ea04bf3 --- /dev/null +++ b/Marechai.App/Services/Client/Models/WhiteBalance.cs @@ -0,0 +1,55 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Marechai.App.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WhiteBalance : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WhiteBalance() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Marechai.App.Models.WhiteBalance CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Marechai.App.Models.WhiteBalance(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/News/Latest/LatestRequestBuilder.cs b/Marechai.App/Services/Client/News/Latest/LatestRequestBuilder.cs new file mode 100644 index 00000000..56021c47 --- /dev/null +++ b/Marechai.App/Services/Client/News/Latest/LatestRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.News.Latest +{ + /// + /// Builds and executes requests for operations under \news\latest + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LatestRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LatestRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/news/latest", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LatestRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/news/latest", rawUrl) + { + } + /// A List<global::Marechai.App.Models.NewsDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.NewsDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.News.Latest.LatestRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.News.Latest.LatestRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LatestRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/News/NewsRequestBuilder.cs b/Marechai.App/Services/Client/News/NewsRequestBuilder.cs new file mode 100644 index 00000000..f667388a --- /dev/null +++ b/Marechai.App/Services/Client/News/NewsRequestBuilder.cs @@ -0,0 +1,161 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.News.Latest; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.News +{ + /// + /// Builds and executes requests for operations under \news + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NewsRequestBuilder : BaseRequestBuilder + { + /// The latest property + public global::Marechai.App.News.Latest.LatestRequestBuilder Latest + { + get => new global::Marechai.App.News.Latest.LatestRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public NewsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/news{?id*}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public NewsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/news{?id*}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A List<global::Marechai.App.Models.NewsDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.NewsDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.News.NewsRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.News.NewsRequestBuilder(rawUrl, RequestAdapter); + } + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NewsRequestBuilderDeleteQueryParameters + #pragma warning restore CS1591 + { +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("id")] + public string? Id { get; set; } +#nullable restore +#else + [QueryParameter("id")] + public string Id { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NewsRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class NewsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/People/Item/PeopleItemRequestBuilder.cs b/Marechai.App/Services/Client/People/Item/PeopleItemRequestBuilder.cs new file mode 100644 index 00000000..23d960c3 --- /dev/null +++ b/Marechai.App/Services/Client/People/Item/PeopleItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.People.Item +{ + /// + /// Builds and executes requests for operations under \people\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PeopleItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/people/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PeopleItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/people/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.PersonDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.PersonDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.PersonDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.PersonDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.PersonDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.People.Item.PeopleItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.People.Item.PeopleItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/People/PeopleRequestBuilder.cs b/Marechai.App/Services/Client/People/PeopleRequestBuilder.cs new file mode 100644 index 00000000..bd7216a2 --- /dev/null +++ b/Marechai.App/Services/Client/People/PeopleRequestBuilder.cs @@ -0,0 +1,169 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.People.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.People +{ + /// + /// Builds and executes requests for operations under \people + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.people.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.People.Item.PeopleItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.People.Item.PeopleItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.people.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.People.Item.PeopleItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.People.Item.PeopleItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PeopleRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/people", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PeopleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/people", rawUrl) + { + } + /// A List<global::Marechai.App.Models.PersonDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.PersonDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.PersonDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.PersonDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.PersonDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.PersonDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.People.PeopleRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.People.PeopleRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/PeopleByBook/Item/PeopleByBookItemRequestBuilder.cs b/Marechai.App/Services/Client/PeopleByBook/Item/PeopleByBookItemRequestBuilder.cs new file mode 100644 index 00000000..01b2a51e --- /dev/null +++ b/Marechai.App/Services/Client/PeopleByBook/Item/PeopleByBookItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.PeopleByBook.Item +{ + /// + /// Builds and executes requests for operations under \people-by-book\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleByBookItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PeopleByBookItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/people-by-book/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PeopleByBookItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/people-by-book/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.PeopleByBook.Item.PeopleByBookItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.PeopleByBook.Item.PeopleByBookItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleByBookItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/PeopleByBook/PeopleByBookRequestBuilder.cs b/Marechai.App/Services/Client/PeopleByBook/PeopleByBookRequestBuilder.cs new file mode 100644 index 00000000..9f216d26 --- /dev/null +++ b/Marechai.App/Services/Client/PeopleByBook/PeopleByBookRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.PeopleByBook.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.PeopleByBook +{ + /// + /// Builds and executes requests for operations under \people-by-book + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleByBookRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.peopleByBook.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.PeopleByBook.Item.PeopleByBookItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.PeopleByBook.Item.PeopleByBookItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.peopleByBook.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.PeopleByBook.Item.PeopleByBookItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.PeopleByBook.Item.PeopleByBookItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PeopleByBookRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/people-by-book", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PeopleByBookRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/people-by-book", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.PersonByBookDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.PersonByBookDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.PersonByBookDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.PersonByBookDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.PeopleByBook.PeopleByBookRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.PeopleByBook.PeopleByBookRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleByBookRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/PeopleByDocument/Item/PeopleByDocumentItemRequestBuilder.cs b/Marechai.App/Services/Client/PeopleByDocument/Item/PeopleByDocumentItemRequestBuilder.cs new file mode 100644 index 00000000..760934c0 --- /dev/null +++ b/Marechai.App/Services/Client/PeopleByDocument/Item/PeopleByDocumentItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.PeopleByDocument.Item +{ + /// + /// Builds and executes requests for operations under \people-by-document\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleByDocumentItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PeopleByDocumentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/people-by-document/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PeopleByDocumentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/people-by-document/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.PeopleByDocument.Item.PeopleByDocumentItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.PeopleByDocument.Item.PeopleByDocumentItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleByDocumentItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/PeopleByDocument/PeopleByDocumentRequestBuilder.cs b/Marechai.App/Services/Client/PeopleByDocument/PeopleByDocumentRequestBuilder.cs new file mode 100644 index 00000000..06039093 --- /dev/null +++ b/Marechai.App/Services/Client/PeopleByDocument/PeopleByDocumentRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.PeopleByDocument.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.PeopleByDocument +{ + /// + /// Builds and executes requests for operations under \people-by-document + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleByDocumentRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.peopleByDocument.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.PeopleByDocument.Item.PeopleByDocumentItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.PeopleByDocument.Item.PeopleByDocumentItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.peopleByDocument.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.PeopleByDocument.Item.PeopleByDocumentItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.PeopleByDocument.Item.PeopleByDocumentItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PeopleByDocumentRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/people-by-document", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PeopleByDocumentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/people-by-document", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.PersonByDocumentDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.PersonByDocumentDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.PersonByDocumentDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.PersonByDocumentDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.PeopleByDocument.PeopleByDocumentRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.PeopleByDocument.PeopleByDocumentRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleByDocumentRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/PeopleByMagazine/Item/PeopleByMagazineItemRequestBuilder.cs b/Marechai.App/Services/Client/PeopleByMagazine/Item/PeopleByMagazineItemRequestBuilder.cs new file mode 100644 index 00000000..fd4261af --- /dev/null +++ b/Marechai.App/Services/Client/PeopleByMagazine/Item/PeopleByMagazineItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.PeopleByMagazine.Item +{ + /// + /// Builds and executes requests for operations under \people-by-magazine\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleByMagazineItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PeopleByMagazineItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/people-by-magazine/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PeopleByMagazineItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/people-by-magazine/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.PeopleByMagazine.Item.PeopleByMagazineItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.PeopleByMagazine.Item.PeopleByMagazineItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleByMagazineItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/PeopleByMagazine/PeopleByMagazineRequestBuilder.cs b/Marechai.App/Services/Client/PeopleByMagazine/PeopleByMagazineRequestBuilder.cs new file mode 100644 index 00000000..cbf2c29a --- /dev/null +++ b/Marechai.App/Services/Client/PeopleByMagazine/PeopleByMagazineRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.PeopleByMagazine.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.PeopleByMagazine +{ + /// + /// Builds and executes requests for operations under \people-by-magazine + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleByMagazineRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.peopleByMagazine.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.PeopleByMagazine.Item.PeopleByMagazineItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.PeopleByMagazine.Item.PeopleByMagazineItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.peopleByMagazine.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.PeopleByMagazine.Item.PeopleByMagazineItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.PeopleByMagazine.Item.PeopleByMagazineItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PeopleByMagazineRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/people-by-magazine", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PeopleByMagazineRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/people-by-magazine", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.PersonByMagazineDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.PersonByMagazineDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.PersonByMagazineDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.PersonByMagazineDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.PeopleByMagazine.PeopleByMagazineRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.PeopleByMagazine.PeopleByMagazineRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PeopleByMagazineRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Processor/Item/InstructionSetExtensions/InstructionSetExtensionsRequestBuilder.cs b/Marechai.App/Services/Client/Processor/Item/InstructionSetExtensions/InstructionSetExtensionsRequestBuilder.cs new file mode 100644 index 00000000..28e7697e --- /dev/null +++ b/Marechai.App/Services/Client/Processor/Item/InstructionSetExtensions/InstructionSetExtensionsRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Processor.Item.InstructionSetExtensions +{ + /// + /// Builds and executes requests for operations under \processor\{processorId}\instruction-set-extensions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstructionSetExtensionsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InstructionSetExtensionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/processor/{processorId}/instruction-set-extensions", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InstructionSetExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/processor/{processorId}/instruction-set-extensions", rawUrl) + { + } + /// A List<global::Marechai.App.Models.InstructionSetExtensionByProcessorDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.InstructionSetExtensionByProcessorDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Processor.Item.InstructionSetExtensions.InstructionSetExtensionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Processor.Item.InstructionSetExtensions.InstructionSetExtensionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstructionSetExtensionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Processor/Item/WithProcessorItemRequestBuilder.cs b/Marechai.App/Services/Client/Processor/Item/WithProcessorItemRequestBuilder.cs new file mode 100644 index 00000000..92eea2fa --- /dev/null +++ b/Marechai.App/Services/Client/Processor/Item/WithProcessorItemRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Processor.Item.InstructionSetExtensions; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Marechai.App.Processor.Item +{ + /// + /// Builds and executes requests for operations under \processor\{processorId} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithProcessorItemRequestBuilder : BaseRequestBuilder + { + /// The instructionSetExtensions property + public global::Marechai.App.Processor.Item.InstructionSetExtensions.InstructionSetExtensionsRequestBuilder InstructionSetExtensions + { + get => new global::Marechai.App.Processor.Item.InstructionSetExtensions.InstructionSetExtensionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithProcessorItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/processor/{processorId}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithProcessorItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/processor/{processorId}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Processor/ProcessorRequestBuilder.cs b/Marechai.App/Services/Client/Processor/ProcessorRequestBuilder.cs new file mode 100644 index 00000000..65897dc2 --- /dev/null +++ b/Marechai.App/Services/Client/Processor/ProcessorRequestBuilder.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Processor.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Marechai.App.Processor +{ + /// + /// Builds and executes requests for operations under \processor + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProcessorRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.processor.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Processor.Item.WithProcessorItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("processorId", position); + return new global::Marechai.App.Processor.Item.WithProcessorItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.processor.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Processor.Item.WithProcessorItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("processorId", position); + return new global::Marechai.App.Processor.Item.WithProcessorItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProcessorRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/processor", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProcessorRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/processor", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Processors/Item/ProcessorsItemRequestBuilder.cs b/Marechai.App/Services/Client/Processors/Item/ProcessorsItemRequestBuilder.cs new file mode 100644 index 00000000..a31afbb4 --- /dev/null +++ b/Marechai.App/Services/Client/Processors/Item/ProcessorsItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Processors.Item +{ + /// + /// Builds and executes requests for operations under \processors\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProcessorsItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProcessorsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/processors/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProcessorsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/processors/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.ProcessorDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.ProcessorDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.ProcessorDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.ProcessorDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.ProcessorDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Processors.Item.ProcessorsItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Processors.Item.ProcessorsItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProcessorsItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProcessorsItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProcessorsItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Processors/ProcessorsRequestBuilder.cs b/Marechai.App/Services/Client/Processors/ProcessorsRequestBuilder.cs new file mode 100644 index 00000000..3f05746f --- /dev/null +++ b/Marechai.App/Services/Client/Processors/ProcessorsRequestBuilder.cs @@ -0,0 +1,169 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.Processors.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Processors +{ + /// + /// Builds and executes requests for operations under \processors + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProcessorsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.processors.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Processors.Item.ProcessorsItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Processors.Item.ProcessorsItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.processors.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Processors.Item.ProcessorsItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Processors.Item.ProcessorsItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProcessorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/processors", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProcessorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/processors", rawUrl) + { + } + /// A List<global::Marechai.App.Models.ProcessorDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.ProcessorDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.ProcessorDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.ProcessorDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.ProcessorDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.ProcessorDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Processors.ProcessorsRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Processors.ProcessorsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProcessorsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProcessorsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/ProcessorsByMachine/ByMachine/ByMachineRequestBuilder.cs b/Marechai.App/Services/Client/ProcessorsByMachine/ByMachine/ByMachineRequestBuilder.cs new file mode 100644 index 00000000..5f106f5c --- /dev/null +++ b/Marechai.App/Services/Client/ProcessorsByMachine/ByMachine/ByMachineRequestBuilder.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable CS0618 +using Marechai.App.ProcessorsByMachine.ByMachine.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Marechai.App.ProcessorsByMachine.ByMachine +{ + /// + /// Builds and executes requests for operations under \processors-by-machine\by-machine + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ByMachineRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.processorsByMachine.byMachine.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.ProcessorsByMachine.ByMachine.Item.WithMachineItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("machineId", position); + return new global::Marechai.App.ProcessorsByMachine.ByMachine.Item.WithMachineItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.processorsByMachine.byMachine.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.ProcessorsByMachine.ByMachine.Item.WithMachineItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("machineId", position); + return new global::Marechai.App.ProcessorsByMachine.ByMachine.Item.WithMachineItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ByMachineRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/processors-by-machine/by-machine", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ByMachineRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/processors-by-machine/by-machine", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/ProcessorsByMachine/ByMachine/Item/WithMachineItemRequestBuilder.cs b/Marechai.App/Services/Client/ProcessorsByMachine/ByMachine/Item/WithMachineItemRequestBuilder.cs new file mode 100644 index 00000000..1934cdc7 --- /dev/null +++ b/Marechai.App/Services/Client/ProcessorsByMachine/ByMachine/Item/WithMachineItemRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.ProcessorsByMachine.ByMachine.Item +{ + /// + /// Builds and executes requests for operations under \processors-by-machine\by-machine\{machineId} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithMachineItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithMachineItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/processors-by-machine/by-machine/{machineId}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithMachineItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/processors-by-machine/by-machine/{machineId}", rawUrl) + { + } + /// A List<global::Marechai.App.Models.ProcessorByMachineDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.ProcessorByMachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.ProcessorsByMachine.ByMachine.Item.WithMachineItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.ProcessorsByMachine.ByMachine.Item.WithMachineItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithMachineItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/ProcessorsByMachine/Item/ProcessorsByMachineItemRequestBuilder.cs b/Marechai.App/Services/Client/ProcessorsByMachine/Item/ProcessorsByMachineItemRequestBuilder.cs new file mode 100644 index 00000000..29af287d --- /dev/null +++ b/Marechai.App/Services/Client/ProcessorsByMachine/Item/ProcessorsByMachineItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.ProcessorsByMachine.Item +{ + /// + /// Builds and executes requests for operations under \processors-by-machine\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProcessorsByMachineItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProcessorsByMachineItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/processors-by-machine/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProcessorsByMachineItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/processors-by-machine/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.ProcessorsByMachine.Item.ProcessorsByMachineItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.ProcessorsByMachine.Item.ProcessorsByMachineItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProcessorsByMachineItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/ProcessorsByMachine/ProcessorsByMachineRequestBuilder.cs b/Marechai.App/Services/Client/ProcessorsByMachine/ProcessorsByMachineRequestBuilder.cs new file mode 100644 index 00000000..da3e0427 --- /dev/null +++ b/Marechai.App/Services/Client/ProcessorsByMachine/ProcessorsByMachineRequestBuilder.cs @@ -0,0 +1,130 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.ProcessorsByMachine.ByMachine; +using Marechai.App.ProcessorsByMachine.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.ProcessorsByMachine +{ + /// + /// Builds and executes requests for operations under \processors-by-machine + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProcessorsByMachineRequestBuilder : BaseRequestBuilder + { + /// The byMachine property + public global::Marechai.App.ProcessorsByMachine.ByMachine.ByMachineRequestBuilder ByMachine + { + get => new global::Marechai.App.ProcessorsByMachine.ByMachine.ByMachineRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Marechai.App.processorsByMachine.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.ProcessorsByMachine.Item.ProcessorsByMachineItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.ProcessorsByMachine.Item.ProcessorsByMachineItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.processorsByMachine.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.ProcessorsByMachine.Item.ProcessorsByMachineItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.ProcessorsByMachine.Item.ProcessorsByMachineItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProcessorsByMachineRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/processors-by-machine", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProcessorsByMachineRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/processors-by-machine", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.ProcessorByMachineDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.ProcessorByMachineDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.ProcessorByMachineDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.ProcessorByMachineDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.ProcessorsByMachine.ProcessorsByMachineRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.ProcessorsByMachine.ProcessorsByMachineRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProcessorsByMachineRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Resolutions/Item/ResolutionsItemRequestBuilder.cs b/Marechai.App/Services/Client/Resolutions/Item/ResolutionsItemRequestBuilder.cs new file mode 100644 index 00000000..399befc4 --- /dev/null +++ b/Marechai.App/Services/Client/Resolutions/Item/ResolutionsItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Resolutions.Item +{ + /// + /// Builds and executes requests for operations under \resolutions\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionsItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ResolutionsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/resolutions/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ResolutionsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/resolutions/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.ResolutionDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.ResolutionDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.ResolutionDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.ResolutionDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.ResolutionDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Resolutions.Item.ResolutionsItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Resolutions.Item.ResolutionsItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionsItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionsItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionsItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Resolutions/ResolutionsRequestBuilder.cs b/Marechai.App/Services/Client/Resolutions/ResolutionsRequestBuilder.cs new file mode 100644 index 00000000..1ba2b168 --- /dev/null +++ b/Marechai.App/Services/Client/Resolutions/ResolutionsRequestBuilder.cs @@ -0,0 +1,169 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.Resolutions.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Resolutions +{ + /// + /// Builds and executes requests for operations under \resolutions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.resolutions.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Resolutions.Item.ResolutionsItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Resolutions.Item.ResolutionsItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.resolutions.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Resolutions.Item.ResolutionsItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.Resolutions.Item.ResolutionsItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ResolutionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/resolutions", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ResolutionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/resolutions", rawUrl) + { + } + /// A List<global::Marechai.App.Models.ResolutionDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.ResolutionDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.ResolutionDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.ResolutionDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.ResolutionDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.ResolutionDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Resolutions.ResolutionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Resolutions.ResolutionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/ResolutionsByGpu/Gpus/GpusRequestBuilder.cs b/Marechai.App/Services/Client/ResolutionsByGpu/Gpus/GpusRequestBuilder.cs new file mode 100644 index 00000000..e06b4dfb --- /dev/null +++ b/Marechai.App/Services/Client/ResolutionsByGpu/Gpus/GpusRequestBuilder.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable CS0618 +using Marechai.App.ResolutionsByGpu.Gpus.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Marechai.App.ResolutionsByGpu.Gpus +{ + /// + /// Builds and executes requests for operations under \resolutions-by-gpu\gpus + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class GpusRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.resolutionsByGpu.gpus.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.ResolutionsByGpu.Gpus.Item.WithResolutionItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("resolutionId", position); + return new global::Marechai.App.ResolutionsByGpu.Gpus.Item.WithResolutionItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.resolutionsByGpu.gpus.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.ResolutionsByGpu.Gpus.Item.WithResolutionItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("resolutionId", position); + return new global::Marechai.App.ResolutionsByGpu.Gpus.Item.WithResolutionItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GpusRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/resolutions-by-gpu/gpus", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GpusRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/resolutions-by-gpu/gpus", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/ResolutionsByGpu/Gpus/Item/Resolutions/ResolutionsRequestBuilder.cs b/Marechai.App/Services/Client/ResolutionsByGpu/Gpus/Item/Resolutions/ResolutionsRequestBuilder.cs new file mode 100644 index 00000000..dc8b2dbb --- /dev/null +++ b/Marechai.App/Services/Client/ResolutionsByGpu/Gpus/Item/Resolutions/ResolutionsRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.ResolutionsByGpu.Gpus.Item.Resolutions +{ + /// + /// Builds and executes requests for operations under \resolutions-by-gpu\gpus\{resolutionId}\resolutions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ResolutionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/resolutions-by-gpu/gpus/{resolutionId}/resolutions", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ResolutionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/resolutions-by-gpu/gpus/{resolutionId}/resolutions", rawUrl) + { + } + /// A List<global::Marechai.App.Models.ResolutionByGpuDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.ResolutionByGpuDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.ResolutionsByGpu.Gpus.Item.Resolutions.ResolutionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.ResolutionsByGpu.Gpus.Item.Resolutions.ResolutionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/ResolutionsByGpu/Gpus/Item/WithResolutionItemRequestBuilder.cs b/Marechai.App/Services/Client/ResolutionsByGpu/Gpus/Item/WithResolutionItemRequestBuilder.cs new file mode 100644 index 00000000..de04800d --- /dev/null +++ b/Marechai.App/Services/Client/ResolutionsByGpu/Gpus/Item/WithResolutionItemRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using Marechai.App.ResolutionsByGpu.Gpus.Item.Resolutions; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Marechai.App.ResolutionsByGpu.Gpus.Item +{ + /// + /// Builds and executes requests for operations under \resolutions-by-gpu\gpus\{resolutionId} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithResolutionItemRequestBuilder : BaseRequestBuilder + { + /// The resolutions property + public global::Marechai.App.ResolutionsByGpu.Gpus.Item.Resolutions.ResolutionsRequestBuilder Resolutions + { + get => new global::Marechai.App.ResolutionsByGpu.Gpus.Item.Resolutions.ResolutionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithResolutionItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/resolutions-by-gpu/gpus/{resolutionId}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithResolutionItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/resolutions-by-gpu/gpus/{resolutionId}", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/ResolutionsByGpu/Item/ResolutionsByGpuItemRequestBuilder.cs b/Marechai.App/Services/Client/ResolutionsByGpu/Item/ResolutionsByGpuItemRequestBuilder.cs new file mode 100644 index 00000000..d25e0ee4 --- /dev/null +++ b/Marechai.App/Services/Client/ResolutionsByGpu/Item/ResolutionsByGpuItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.ResolutionsByGpu.Item +{ + /// + /// Builds and executes requests for operations under \resolutions-by-gpu\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionsByGpuItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ResolutionsByGpuItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/resolutions-by-gpu/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ResolutionsByGpuItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/resolutions-by-gpu/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.ResolutionsByGpu.Item.ResolutionsByGpuItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.ResolutionsByGpu.Item.ResolutionsByGpuItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionsByGpuItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/ResolutionsByGpu/ResolutionsByGpuRequestBuilder.cs b/Marechai.App/Services/Client/ResolutionsByGpu/ResolutionsByGpuRequestBuilder.cs new file mode 100644 index 00000000..45e6db9d --- /dev/null +++ b/Marechai.App/Services/Client/ResolutionsByGpu/ResolutionsByGpuRequestBuilder.cs @@ -0,0 +1,130 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.ResolutionsByGpu.Gpus; +using Marechai.App.ResolutionsByGpu.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.ResolutionsByGpu +{ + /// + /// Builds and executes requests for operations under \resolutions-by-gpu + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionsByGpuRequestBuilder : BaseRequestBuilder + { + /// The gpus property + public global::Marechai.App.ResolutionsByGpu.Gpus.GpusRequestBuilder Gpus + { + get => new global::Marechai.App.ResolutionsByGpu.Gpus.GpusRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Marechai.App.resolutionsByGpu.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.ResolutionsByGpu.Item.ResolutionsByGpuItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.ResolutionsByGpu.Item.ResolutionsByGpuItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.resolutionsByGpu.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.ResolutionsByGpu.Item.ResolutionsByGpuItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.ResolutionsByGpu.Item.ResolutionsByGpuItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ResolutionsByGpuRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/resolutions-by-gpu", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ResolutionsByGpuRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/resolutions-by-gpu", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.ResolutionByGpuDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.ResolutionByGpuDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.ResolutionByGpuDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.ResolutionByGpuDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.ResolutionsByGpu.ResolutionsByGpuRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.ResolutionsByGpu.ResolutionsByGpuRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionsByGpuRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/ResolutionsByScreen/Item/ResolutionsByScreenItemRequestBuilder.cs b/Marechai.App/Services/Client/ResolutionsByScreen/Item/ResolutionsByScreenItemRequestBuilder.cs new file mode 100644 index 00000000..862a77f0 --- /dev/null +++ b/Marechai.App/Services/Client/ResolutionsByScreen/Item/ResolutionsByScreenItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.ResolutionsByScreen.Item +{ + /// + /// Builds and executes requests for operations under \resolutions-by-screen\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionsByScreenItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ResolutionsByScreenItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/resolutions-by-screen/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ResolutionsByScreenItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/resolutions-by-screen/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.ResolutionsByScreen.Item.ResolutionsByScreenItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.ResolutionsByScreen.Item.ResolutionsByScreenItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionsByScreenItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/ResolutionsByScreen/ResolutionsByScreenRequestBuilder.cs b/Marechai.App/Services/Client/ResolutionsByScreen/ResolutionsByScreenRequestBuilder.cs new file mode 100644 index 00000000..949e3f1d --- /dev/null +++ b/Marechai.App/Services/Client/ResolutionsByScreen/ResolutionsByScreenRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.ResolutionsByScreen.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.ResolutionsByScreen +{ + /// + /// Builds and executes requests for operations under \resolutions-by-screen + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionsByScreenRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.resolutionsByScreen.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.ResolutionsByScreen.Item.ResolutionsByScreenItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.ResolutionsByScreen.Item.ResolutionsByScreenItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.resolutionsByScreen.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.ResolutionsByScreen.Item.ResolutionsByScreenItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.ResolutionsByScreen.Item.ResolutionsByScreenItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ResolutionsByScreenRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/resolutions-by-screen", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ResolutionsByScreenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/resolutions-by-screen", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.ResolutionByScreenDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.ResolutionByScreenDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.ResolutionByScreenDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.ResolutionByScreenDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.ResolutionsByScreen.ResolutionsByScreenRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.ResolutionsByScreen.ResolutionsByScreenRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionsByScreenRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Screens/Item/ItemRequestBuilder.cs b/Marechai.App/Services/Client/Screens/Item/ItemRequestBuilder.cs new file mode 100644 index 00000000..1cb24ab9 --- /dev/null +++ b/Marechai.App/Services/Client/Screens/Item/ItemRequestBuilder.cs @@ -0,0 +1,198 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.Screens.Item.Resolutions; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Screens.Item +{ + /// + /// Builds and executes requests for operations under \screens\{-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilder : BaseRequestBuilder + { + /// The resolutions property + public global::Marechai.App.Screens.Item.Resolutions.ResolutionsRequestBuilder Resolutions + { + get => new global::Marechai.App.Screens.Item.Resolutions.ResolutionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/screens/{%2Did}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/screens/{%2Did}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.ScreenDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.ScreenDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.ScreenDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.ScreenDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.ScreenDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Screens.Item.ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Screens.Item.ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Screens/Item/Resolutions/ResolutionsRequestBuilder.cs b/Marechai.App/Services/Client/Screens/Item/Resolutions/ResolutionsRequestBuilder.cs new file mode 100644 index 00000000..2be946c2 --- /dev/null +++ b/Marechai.App/Services/Client/Screens/Item/Resolutions/ResolutionsRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Screens.Item.Resolutions +{ + /// + /// Builds and executes requests for operations under \screens\{-id}\resolutions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ResolutionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/screens/{%2Did}/resolutions", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ResolutionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/screens/{%2Did}/resolutions", rawUrl) + { + } + /// A List<global::Marechai.App.Models.ResolutionByScreenDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.ResolutionByScreenDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Screens.Item.Resolutions.ResolutionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Screens.Item.Resolutions.ResolutionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResolutionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Screens/ScreensRequestBuilder.cs b/Marechai.App/Services/Client/Screens/ScreensRequestBuilder.cs new file mode 100644 index 00000000..8ddd3bfe --- /dev/null +++ b/Marechai.App/Services/Client/Screens/ScreensRequestBuilder.cs @@ -0,0 +1,169 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.Screens.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Screens +{ + /// + /// Builds and executes requests for operations under \screens + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScreensRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.screens.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Screens.Item.ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("%2Did", position); + return new global::Marechai.App.Screens.Item.ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.screens.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.Screens.Item.ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("%2Did", position); + return new global::Marechai.App.Screens.Item.ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScreensRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/screens", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScreensRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/screens", rawUrl) + { + } + /// A List<global::Marechai.App.Models.ScreenDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.ScreenDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.ScreenDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.ScreenDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.ScreenDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.ScreenDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Screens.ScreensRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Screens.ScreensRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScreensRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScreensRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/ScreensByMachine/Item/ScreensByMachineItemRequestBuilder.cs b/Marechai.App/Services/Client/ScreensByMachine/Item/ScreensByMachineItemRequestBuilder.cs new file mode 100644 index 00000000..8a6918dd --- /dev/null +++ b/Marechai.App/Services/Client/ScreensByMachine/Item/ScreensByMachineItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.ScreensByMachine.Item +{ + /// + /// Builds and executes requests for operations under \screens-by-machine\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScreensByMachineItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScreensByMachineItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/screens-by-machine/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScreensByMachineItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/screens-by-machine/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.ScreensByMachine.Item.ScreensByMachineItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.ScreensByMachine.Item.ScreensByMachineItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScreensByMachineItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/ScreensByMachine/ScreensByMachineRequestBuilder.cs b/Marechai.App/Services/Client/ScreensByMachine/ScreensByMachineRequestBuilder.cs new file mode 100644 index 00000000..6dfca886 --- /dev/null +++ b/Marechai.App/Services/Client/ScreensByMachine/ScreensByMachineRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.ScreensByMachine.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.ScreensByMachine +{ + /// + /// Builds and executes requests for operations under \screens-by-machine + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScreensByMachineRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.screensByMachine.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.ScreensByMachine.Item.ScreensByMachineItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.ScreensByMachine.Item.ScreensByMachineItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.screensByMachine.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.ScreensByMachine.Item.ScreensByMachineItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.ScreensByMachine.Item.ScreensByMachineItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScreensByMachineRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/screens-by-machine", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ScreensByMachineRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/screens-by-machine", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.ScreenByMachineDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.ScreenByMachineDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.ScreenByMachineDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.ScreenByMachineDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.ScreensByMachine.ScreensByMachineRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.ScreensByMachine.ScreensByMachineRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ScreensByMachineRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Software/Families/Companies/CompaniesRequestBuilder.cs b/Marechai.App/Services/Client/Software/Families/Companies/CompaniesRequestBuilder.cs new file mode 100644 index 00000000..6f2e8487 --- /dev/null +++ b/Marechai.App/Services/Client/Software/Families/Companies/CompaniesRequestBuilder.cs @@ -0,0 +1,111 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.Software.Families.Companies.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Software.Families.Companies +{ + /// + /// Builds and executes requests for operations under \software\families\companies + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.software.families.companies.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Software.Families.Companies.Item.CompaniesItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Software.Families.Companies.Item.CompaniesItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/families/companies", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/families/companies", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.CompanyBySoftwareFamilyDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.CompanyBySoftwareFamilyDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyBySoftwareFamilyDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyBySoftwareFamilyDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Software.Families.Companies.CompaniesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Software.Families.Companies.CompaniesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Software/Families/Companies/Item/CompaniesItemRequestBuilder.cs b/Marechai.App/Services/Client/Software/Families/Companies/Item/CompaniesItemRequestBuilder.cs new file mode 100644 index 00000000..b7564c1e --- /dev/null +++ b/Marechai.App/Services/Client/Software/Families/Companies/Item/CompaniesItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Software.Families.Companies.Item +{ + /// + /// Builds and executes requests for operations under \software\families\companies\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompaniesItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/families/companies/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompaniesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/families/companies/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Software.Families.Companies.Item.CompaniesItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Software.Families.Companies.Item.CompaniesItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Software/Families/FamiliesRequestBuilder.cs b/Marechai.App/Services/Client/Software/Families/FamiliesRequestBuilder.cs new file mode 100644 index 00000000..28eac738 --- /dev/null +++ b/Marechai.App/Services/Client/Software/Families/FamiliesRequestBuilder.cs @@ -0,0 +1,162 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.Software.Families.Companies; +using Marechai.App.Software.Families.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Software.Families +{ + /// + /// Builds and executes requests for operations under \software\families + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FamiliesRequestBuilder : BaseRequestBuilder + { + /// The companies property + public global::Marechai.App.Software.Families.Companies.CompaniesRequestBuilder Companies + { + get => new global::Marechai.App.Software.Families.Companies.CompaniesRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Marechai.App.software.families.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Software.Families.Item.ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("%2Did", position); + return new global::Marechai.App.Software.Families.Item.ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FamiliesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/families", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FamiliesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/families", rawUrl) + { + } + /// A List<global::Marechai.App.Models.SoftwareFamilyDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.SoftwareFamilyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.SoftwareFamilyDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.SoftwareFamilyDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.SoftwareFamilyDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.SoftwareFamilyDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Software.Families.FamiliesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Software.Families.FamiliesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FamiliesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class FamiliesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Software/Families/Item/Companies/CompaniesRequestBuilder.cs b/Marechai.App/Services/Client/Software/Families/Item/Companies/CompaniesRequestBuilder.cs new file mode 100644 index 00000000..605e1ccd --- /dev/null +++ b/Marechai.App/Services/Client/Software/Families/Item/Companies/CompaniesRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Software.Families.Item.Companies +{ + /// + /// Builds and executes requests for operations under \software\families\{-id}\companies + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/families/{%2Did}/companies", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/families/{%2Did}/companies", rawUrl) + { + } + /// A List<global::Marechai.App.Models.CompanyBySoftwareFamilyDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.CompanyBySoftwareFamilyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Software.Families.Item.Companies.CompaniesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Software.Families.Item.Companies.CompaniesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Software/Families/Item/ItemRequestBuilder.cs b/Marechai.App/Services/Client/Software/Families/Item/ItemRequestBuilder.cs new file mode 100644 index 00000000..3d704624 --- /dev/null +++ b/Marechai.App/Services/Client/Software/Families/Item/ItemRequestBuilder.cs @@ -0,0 +1,198 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.Software.Families.Item.Companies; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Software.Families.Item +{ + /// + /// Builds and executes requests for operations under \software\families\{-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilder : BaseRequestBuilder + { + /// The companies property + public global::Marechai.App.Software.Families.Item.Companies.CompaniesRequestBuilder Companies + { + get => new global::Marechai.App.Software.Families.Item.Companies.CompaniesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/families/{%2Did}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/families/{%2Did}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.SoftwareFamilyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.SoftwareFamilyDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.SoftwareFamilyDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.SoftwareFamilyDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.SoftwareFamilyDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Software.Families.Item.ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Software.Families.Item.ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Software/SoftwareRequestBuilder.cs b/Marechai.App/Services/Client/Software/SoftwareRequestBuilder.cs new file mode 100644 index 00000000..199e5448 --- /dev/null +++ b/Marechai.App/Services/Client/Software/SoftwareRequestBuilder.cs @@ -0,0 +1,53 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Software.Families; +using Marechai.App.Software.Variants; +using Marechai.App.Software.Versions; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Marechai.App.Software +{ + /// + /// Builds and executes requests for operations under \software + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SoftwareRequestBuilder : BaseRequestBuilder + { + /// The families property + public global::Marechai.App.Software.Families.FamiliesRequestBuilder Families + { + get => new global::Marechai.App.Software.Families.FamiliesRequestBuilder(PathParameters, RequestAdapter); + } + /// The variants property + public global::Marechai.App.Software.Variants.VariantsRequestBuilder Variants + { + get => new global::Marechai.App.Software.Variants.VariantsRequestBuilder(PathParameters, RequestAdapter); + } + /// The versions property + public global::Marechai.App.Software.Versions.VersionsRequestBuilder Versions + { + get => new global::Marechai.App.Software.Versions.VersionsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SoftwareRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SoftwareRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Software/Variants/Companies/CompaniesRequestBuilder.cs b/Marechai.App/Services/Client/Software/Variants/Companies/CompaniesRequestBuilder.cs new file mode 100644 index 00000000..43a73838 --- /dev/null +++ b/Marechai.App/Services/Client/Software/Variants/Companies/CompaniesRequestBuilder.cs @@ -0,0 +1,111 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.Software.Variants.Companies.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Software.Variants.Companies +{ + /// + /// Builds and executes requests for operations under \software\variants\companies + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.software.variants.companies.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Software.Variants.Companies.Item.CompaniesItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Software.Variants.Companies.Item.CompaniesItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/variants/companies", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/variants/companies", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.CompanyBySoftwareVariantDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.CompanyBySoftwareVariantDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyBySoftwareVariantDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyBySoftwareVariantDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Software.Variants.Companies.CompaniesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Software.Variants.Companies.CompaniesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Software/Variants/Companies/Item/CompaniesItemRequestBuilder.cs b/Marechai.App/Services/Client/Software/Variants/Companies/Item/CompaniesItemRequestBuilder.cs new file mode 100644 index 00000000..9147aad0 --- /dev/null +++ b/Marechai.App/Services/Client/Software/Variants/Companies/Item/CompaniesItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Software.Variants.Companies.Item +{ + /// + /// Builds and executes requests for operations under \software\variants\companies\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompaniesItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/variants/companies/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompaniesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/variants/companies/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Software.Variants.Companies.Item.CompaniesItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Software.Variants.Companies.Item.CompaniesItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Software/Variants/Item/Companies/CompaniesRequestBuilder.cs b/Marechai.App/Services/Client/Software/Variants/Item/Companies/CompaniesRequestBuilder.cs new file mode 100644 index 00000000..fed99c4b --- /dev/null +++ b/Marechai.App/Services/Client/Software/Variants/Item/Companies/CompaniesRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Software.Variants.Item.Companies +{ + /// + /// Builds and executes requests for operations under \software\variants\{-id}\companies + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/variants/{%2Did}/companies", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/variants/{%2Did}/companies", rawUrl) + { + } + /// A List<global::Marechai.App.Models.CompanyBySoftwareVariantDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.CompanyBySoftwareVariantDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Software.Variants.Item.Companies.CompaniesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Software.Variants.Item.Companies.CompaniesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Software/Variants/Item/ItemRequestBuilder.cs b/Marechai.App/Services/Client/Software/Variants/Item/ItemRequestBuilder.cs new file mode 100644 index 00000000..e9fd5c3a --- /dev/null +++ b/Marechai.App/Services/Client/Software/Variants/Item/ItemRequestBuilder.cs @@ -0,0 +1,198 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.Software.Variants.Item.Companies; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Software.Variants.Item +{ + /// + /// Builds and executes requests for operations under \software\variants\{-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilder : BaseRequestBuilder + { + /// The companies property + public global::Marechai.App.Software.Variants.Item.Companies.CompaniesRequestBuilder Companies + { + get => new global::Marechai.App.Software.Variants.Item.Companies.CompaniesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/variants/{%2Did}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/variants/{%2Did}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.SoftwareVariantDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.SoftwareVariantDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.SoftwareVariantDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.SoftwareVariantDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.SoftwareVariantDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Software.Variants.Item.ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Software.Variants.Item.ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Software/Variants/VariantsRequestBuilder.cs b/Marechai.App/Services/Client/Software/Variants/VariantsRequestBuilder.cs new file mode 100644 index 00000000..8133dcde --- /dev/null +++ b/Marechai.App/Services/Client/Software/Variants/VariantsRequestBuilder.cs @@ -0,0 +1,162 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.Software.Variants.Companies; +using Marechai.App.Software.Variants.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Software.Variants +{ + /// + /// Builds and executes requests for operations under \software\variants + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VariantsRequestBuilder : BaseRequestBuilder + { + /// The companies property + public global::Marechai.App.Software.Variants.Companies.CompaniesRequestBuilder Companies + { + get => new global::Marechai.App.Software.Variants.Companies.CompaniesRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Marechai.App.software.variants.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Software.Variants.Item.ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("%2Did", position); + return new global::Marechai.App.Software.Variants.Item.ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public VariantsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/variants", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public VariantsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/variants", rawUrl) + { + } + /// A List<global::Marechai.App.Models.SoftwareVariantDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.SoftwareVariantDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.SoftwareVariantDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.SoftwareVariantDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.SoftwareVariantDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.SoftwareVariantDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Software.Variants.VariantsRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Software.Variants.VariantsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VariantsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VariantsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Software/Versions/Companies/CompaniesRequestBuilder.cs b/Marechai.App/Services/Client/Software/Versions/Companies/CompaniesRequestBuilder.cs new file mode 100644 index 00000000..b79e5507 --- /dev/null +++ b/Marechai.App/Services/Client/Software/Versions/Companies/CompaniesRequestBuilder.cs @@ -0,0 +1,111 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.Software.Versions.Companies.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Software.Versions.Companies +{ + /// + /// Builds and executes requests for operations under \software\versions\companies + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.software.versions.companies.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Software.Versions.Companies.Item.CompaniesItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.Software.Versions.Companies.Item.CompaniesItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/versions/companies", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/versions/companies", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.CompanyBySoftwareVersionDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.CompanyBySoftwareVersionDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyBySoftwareVersionDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyBySoftwareVersionDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Software.Versions.Companies.CompaniesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Software.Versions.Companies.CompaniesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Software/Versions/Companies/Item/CompaniesItemRequestBuilder.cs b/Marechai.App/Services/Client/Software/Versions/Companies/Item/CompaniesItemRequestBuilder.cs new file mode 100644 index 00000000..b0f7f566 --- /dev/null +++ b/Marechai.App/Services/Client/Software/Versions/Companies/Item/CompaniesItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Software.Versions.Companies.Item +{ + /// + /// Builds and executes requests for operations under \software\versions\companies\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompaniesItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/versions/companies/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompaniesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/versions/companies/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Software.Versions.Companies.Item.CompaniesItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Software.Versions.Companies.Item.CompaniesItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Software/Versions/Item/Companies/CompaniesRequestBuilder.cs b/Marechai.App/Services/Client/Software/Versions/Item/Companies/CompaniesRequestBuilder.cs new file mode 100644 index 00000000..bd99ca13 --- /dev/null +++ b/Marechai.App/Services/Client/Software/Versions/Item/Companies/CompaniesRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Software.Versions.Item.Companies +{ + /// + /// Builds and executes requests for operations under \software\versions\{-id}\companies + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/versions/{%2Did}/companies", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CompaniesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/versions/{%2Did}/companies", rawUrl) + { + } + /// A List<global::Marechai.App.Models.CompanyBySoftwareVersionDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.CompanyBySoftwareVersionDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Software.Versions.Item.Companies.CompaniesRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Software.Versions.Item.Companies.CompaniesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CompaniesRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Software/Versions/Item/ItemRequestBuilder.cs b/Marechai.App/Services/Client/Software/Versions/Item/ItemRequestBuilder.cs new file mode 100644 index 00000000..e0797c42 --- /dev/null +++ b/Marechai.App/Services/Client/Software/Versions/Item/ItemRequestBuilder.cs @@ -0,0 +1,198 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.Software.Versions.Item.Companies; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Software.Versions.Item +{ + /// + /// Builds and executes requests for operations under \software\versions\{-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilder : BaseRequestBuilder + { + /// The companies property + public global::Marechai.App.Software.Versions.Item.Companies.CompaniesRequestBuilder Companies + { + get => new global::Marechai.App.Software.Versions.Item.Companies.CompaniesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/versions/{%2Did}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/versions/{%2Did}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.SoftwareVersionDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.SoftwareVersionDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.SoftwareVersionDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.SoftwareVersionDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.SoftwareVersionDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Software.Versions.Item.ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Software.Versions.Item.ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/Software/Versions/VersionsRequestBuilder.cs b/Marechai.App/Services/Client/Software/Versions/VersionsRequestBuilder.cs new file mode 100644 index 00000000..0a643485 --- /dev/null +++ b/Marechai.App/Services/Client/Software/Versions/VersionsRequestBuilder.cs @@ -0,0 +1,162 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.Software.Versions.Companies; +using Marechai.App.Software.Versions.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.Software.Versions +{ + /// + /// Builds and executes requests for operations under \software\versions + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VersionsRequestBuilder : BaseRequestBuilder + { + /// The companies property + public global::Marechai.App.Software.Versions.Companies.CompaniesRequestBuilder Companies + { + get => new global::Marechai.App.Software.Versions.Companies.CompaniesRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Marechai.App.software.versions.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.Software.Versions.Item.ItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("%2Did", position); + return new global::Marechai.App.Software.Versions.Item.ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public VersionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/versions", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public VersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/software/versions", rawUrl) + { + } + /// A List<global::Marechai.App.Models.SoftwareVersionDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.SoftwareVersionDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.SoftwareVersionDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.SoftwareVersionDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.SoftwareVersionDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.SoftwareVersionDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.Software.Versions.VersionsRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.Software.Versions.VersionsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VersionsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class VersionsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/SoundSynths/Item/SoundSynthsItemRequestBuilder.cs b/Marechai.App/Services/Client/SoundSynths/Item/SoundSynthsItemRequestBuilder.cs new file mode 100644 index 00000000..9cbb99ae --- /dev/null +++ b/Marechai.App/Services/Client/SoundSynths/Item/SoundSynthsItemRequestBuilder.cs @@ -0,0 +1,192 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.SoundSynths.Item +{ + /// + /// Builds and executes requests for operations under \sound-synths\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SoundSynthsItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SoundSynthsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sound-synths/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SoundSynthsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sound-synths/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::Marechai.App.Models.SoundSynthDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::Marechai.App.Models.SoundSynthDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::Marechai.App.Models.SoundSynthDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.SoundSynthDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.SoundSynthDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.SoundSynths.Item.SoundSynthsItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.SoundSynths.Item.SoundSynthsItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SoundSynthsItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SoundSynthsItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SoundSynthsItemRequestBuilderPutRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/SoundSynths/SoundSynthsRequestBuilder.cs b/Marechai.App/Services/Client/SoundSynths/SoundSynthsRequestBuilder.cs new file mode 100644 index 00000000..b784b179 --- /dev/null +++ b/Marechai.App/Services/Client/SoundSynths/SoundSynthsRequestBuilder.cs @@ -0,0 +1,169 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.SoundSynths.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.SoundSynths +{ + /// + /// Builds and executes requests for operations under \sound-synths + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SoundSynthsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.soundSynths.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.SoundSynths.Item.SoundSynthsItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.SoundSynths.Item.SoundSynthsItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.soundSynths.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.SoundSynths.Item.SoundSynthsItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.SoundSynths.Item.SoundSynthsItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SoundSynthsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sound-synths", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SoundSynthsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sound-synths", rawUrl) + { + } + /// A List<global::Marechai.App.Models.SoundSynthDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.SoundSynthDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.SoundSynthDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.SoundSynthDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.SoundSynthDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.SoundSynthDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.SoundSynths.SoundSynthsRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.SoundSynths.SoundSynthsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SoundSynthsRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SoundSynthsRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/SoundSynthsByMachine/ByMachine/ByMachineRequestBuilder.cs b/Marechai.App/Services/Client/SoundSynthsByMachine/ByMachine/ByMachineRequestBuilder.cs new file mode 100644 index 00000000..571587b0 --- /dev/null +++ b/Marechai.App/Services/Client/SoundSynthsByMachine/ByMachine/ByMachineRequestBuilder.cs @@ -0,0 +1,61 @@ +// +#pragma warning disable CS0618 +using Marechai.App.SoundSynthsByMachine.ByMachine.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace Marechai.App.SoundSynthsByMachine.ByMachine +{ + /// + /// Builds and executes requests for operations under \sound-synths-by-machine\by-machine + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ByMachineRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.soundSynthsByMachine.byMachine.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.SoundSynthsByMachine.ByMachine.Item.WithMachineItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("machineId", position); + return new global::Marechai.App.SoundSynthsByMachine.ByMachine.Item.WithMachineItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.soundSynthsByMachine.byMachine.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.SoundSynthsByMachine.ByMachine.Item.WithMachineItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("machineId", position); + return new global::Marechai.App.SoundSynthsByMachine.ByMachine.Item.WithMachineItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ByMachineRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sound-synths-by-machine/by-machine", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ByMachineRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sound-synths-by-machine/by-machine", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/SoundSynthsByMachine/ByMachine/Item/WithMachineItemRequestBuilder.cs b/Marechai.App/Services/Client/SoundSynthsByMachine/ByMachine/Item/WithMachineItemRequestBuilder.cs new file mode 100644 index 00000000..71586567 --- /dev/null +++ b/Marechai.App/Services/Client/SoundSynthsByMachine/ByMachine/Item/WithMachineItemRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.SoundSynthsByMachine.ByMachine.Item +{ + /// + /// Builds and executes requests for operations under \sound-synths-by-machine\by-machine\{machineId} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithMachineItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithMachineItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sound-synths-by-machine/by-machine/{machineId}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithMachineItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sound-synths-by-machine/by-machine/{machineId}", rawUrl) + { + } + /// A List<global::Marechai.App.Models.SoundSynthByMachineDto> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::Marechai.App.Models.SoundSynthByMachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.SoundSynthsByMachine.ByMachine.Item.WithMachineItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.SoundSynthsByMachine.ByMachine.Item.WithMachineItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WithMachineItemRequestBuilderGetRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/SoundSynthsByMachine/Item/SoundSynthsByMachineItemRequestBuilder.cs b/Marechai.App/Services/Client/SoundSynthsByMachine/Item/SoundSynthsByMachineItemRequestBuilder.cs new file mode 100644 index 00000000..430f642d --- /dev/null +++ b/Marechai.App/Services/Client/SoundSynthsByMachine/Item/SoundSynthsByMachineItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.SoundSynthsByMachine.Item +{ + /// + /// Builds and executes requests for operations under \sound-synths-by-machine\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SoundSynthsByMachineItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SoundSynthsByMachineItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sound-synths-by-machine/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SoundSynthsByMachineItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sound-synths-by-machine/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.SoundSynthsByMachine.Item.SoundSynthsByMachineItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.SoundSynthsByMachine.Item.SoundSynthsByMachineItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SoundSynthsByMachineItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/SoundSynthsByMachine/SoundSynthsByMachineRequestBuilder.cs b/Marechai.App/Services/Client/SoundSynthsByMachine/SoundSynthsByMachineRequestBuilder.cs new file mode 100644 index 00000000..80839b5e --- /dev/null +++ b/Marechai.App/Services/Client/SoundSynthsByMachine/SoundSynthsByMachineRequestBuilder.cs @@ -0,0 +1,130 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.SoundSynthsByMachine.ByMachine; +using Marechai.App.SoundSynthsByMachine.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.SoundSynthsByMachine +{ + /// + /// Builds and executes requests for operations under \sound-synths-by-machine + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SoundSynthsByMachineRequestBuilder : BaseRequestBuilder + { + /// The byMachine property + public global::Marechai.App.SoundSynthsByMachine.ByMachine.ByMachineRequestBuilder ByMachine + { + get => new global::Marechai.App.SoundSynthsByMachine.ByMachine.ByMachineRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the Marechai.App.soundSynthsByMachine.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.SoundSynthsByMachine.Item.SoundSynthsByMachineItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.SoundSynthsByMachine.Item.SoundSynthsByMachineItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.soundSynthsByMachine.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.SoundSynthsByMachine.Item.SoundSynthsByMachineItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.SoundSynthsByMachine.Item.SoundSynthsByMachineItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SoundSynthsByMachineRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sound-synths-by-machine", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SoundSynthsByMachineRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sound-synths-by-machine", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.SoundSynthByMachineDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.SoundSynthByMachineDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.SoundSynthByMachineDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.SoundSynthByMachineDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.SoundSynthsByMachine.SoundSynthsByMachineRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.SoundSynthsByMachine.SoundSynthsByMachineRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SoundSynthsByMachineRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/StorageByMachine/Item/StorageByMachineItemRequestBuilder.cs b/Marechai.App/Services/Client/StorageByMachine/Item/StorageByMachineItemRequestBuilder.cs new file mode 100644 index 00000000..0ebc1f94 --- /dev/null +++ b/Marechai.App/Services/Client/StorageByMachine/Item/StorageByMachineItemRequestBuilder.cs @@ -0,0 +1,95 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.StorageByMachine.Item +{ + /// + /// Builds and executes requests for operations under \storage-by-machine\{id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StorageByMachineItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StorageByMachineItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/storage-by-machine/{id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StorageByMachineItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/storage-by-machine/{id}", rawUrl) + { + } + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.StorageByMachine.Item.StorageByMachineItemRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.StorageByMachine.Item.StorageByMachineItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StorageByMachineItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/StorageByMachine/StorageByMachineRequestBuilder.cs b/Marechai.App/Services/Client/StorageByMachine/StorageByMachineRequestBuilder.cs new file mode 100644 index 00000000..a50e7ac9 --- /dev/null +++ b/Marechai.App/Services/Client/StorageByMachine/StorageByMachineRequestBuilder.cs @@ -0,0 +1,124 @@ +// +#pragma warning disable CS0618 +using Marechai.App.Models; +using Marechai.App.StorageByMachine.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Marechai.App.StorageByMachine +{ + /// + /// Builds and executes requests for operations under \storage-by-machine + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StorageByMachineRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the Marechai.App.storageByMachine.item collection + /// Unique identifier of the item + /// A + public global::Marechai.App.StorageByMachine.Item.StorageByMachineItemRequestBuilder this[long position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("id", position); + return new global::Marechai.App.StorageByMachine.Item.StorageByMachineItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// Gets an item from the Marechai.App.storageByMachine.item collection + /// Unique identifier of the item + /// A + [Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")] + public global::Marechai.App.StorageByMachine.Item.StorageByMachineItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position); + return new global::Marechai.App.StorageByMachine.Item.StorageByMachineItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StorageByMachineRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/storage-by-machine", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StorageByMachineRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/storage-by-machine", rawUrl) + { + } + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 401 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::Marechai.App.Models.StorageByMachineDto body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::Marechai.App.Models.StorageByMachineDto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + { "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.StorageByMachineDto body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.StorageByMachineDto body, Action> requestConfiguration = default) + { +#endif + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public global::Marechai.App.StorageByMachine.StorageByMachineRequestBuilder WithUrl(string rawUrl) + { + return new global::Marechai.App.StorageByMachine.StorageByMachineRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + [Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")] + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StorageByMachineRequestBuilderPostRequestConfiguration : RequestConfiguration + { + } + } +} +#pragma warning restore CS0618 diff --git a/Marechai.App/Services/Client/kiota-lock.json b/Marechai.App/Services/Client/kiota-lock.json new file mode 100644 index 00000000..b9b0d46d --- /dev/null +++ b/Marechai.App/Services/Client/kiota-lock.json @@ -0,0 +1,34 @@ +{ + "descriptionHash": "4C4317F1318B3D4CA2225D2F84196E63FE3991CAA0B4FAC3BDA2432C98D3457223C321CFD97E2BC392D20DCE9E265F204F4B0E90C7FE300BC876152A4FC07520", + "descriptionLocation": "http://localhost:5023/openapi/v1.json", + "lockFileVersion": "1.0.0", + "kiotaVersion": "1.29.0", + "clientClassName": "ApiClient", + "typeAccessModifier": "Public", + "clientNamespaceName": "Marechai.App", + "language": "CSharp", + "usesBackingStore": false, + "excludeBackwardCompatible": false, + "includeAdditionalData": true, + "disableSSLValidation": false, + "serializers": [ + "Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory", + "Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory", + "Microsoft.Kiota.Serialization.Form.FormSerializationWriterFactory", + "Microsoft.Kiota.Serialization.Multipart.MultipartSerializationWriterFactory" + ], + "deserializers": [ + "Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory", + "Microsoft.Kiota.Serialization.Text.TextParseNodeFactory", + "Microsoft.Kiota.Serialization.Form.FormParseNodeFactory" + ], + "structuredMimeTypes": [ + "application/json", + "text/plain;q=0.9", + "application/x-www-form-urlencoded;q=0.2", + "multipart/form-data;q=0.1" + ], + "includePatterns": [], + "excludePatterns": [], + "disabledValidationRules": [] +} \ No newline at end of file diff --git a/Marechai.App/Services/CompositeSerializationWriterFactory.cs b/Marechai.App/Services/CompositeSerializationWriterFactory.cs new file mode 100644 index 00000000..6dc84e92 --- /dev/null +++ b/Marechai.App/Services/CompositeSerializationWriterFactory.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Kiota.Abstractions.Serialization; + +namespace Marechai.App.Services; + +public class CompositeSerializationWriterFactory : ISerializationWriterFactory +{ + // Internal list of registered factories. + private readonly List _factories = new(); + + // This method loops through each registered factory and returns the first one that supports the content type. + public ISerializationWriter GetSerializationWriter(string contentType) + { + foreach(ISerializationWriterFactory factory in _factories) + { + try + { + ISerializationWriter? writer = factory.GetSerializationWriter(contentType); + + if(writer != null) return writer; + } + catch(ArgumentOutOfRangeException) + { + // This factory doesn't support the content type; try the next. + } + } + + throw new ArgumentOutOfRangeException(nameof(contentType), + $"No serialization writer is registered for content type: {contentType}"); + } + + /// + public string ValidContentType => string.Join(";", _factories.Select(f => f.ValidContentType)); + + // Add a new factory to the composite. + public void AddFactory(ISerializationWriterFactory writerFactory) + { + if(writerFactory == null) throw new ArgumentNullException(nameof(writerFactory)); + _factories.Add(writerFactory); + } +} \ No newline at end of file diff --git a/Marechai.App/Services/ServiceCollectionExtensions.cs b/Marechai.App/Services/ServiceCollectionExtensions.cs new file mode 100644 index 00000000..d03de081 --- /dev/null +++ b/Marechai.App/Services/ServiceCollectionExtensions.cs @@ -0,0 +1,123 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using Marechai.App.Services; +using Microsoft.Kiota.Abstractions.Authentication; +using Microsoft.Kiota.Http.HttpClientLibrary; +using Microsoft.Kiota.Serialization.Json; +using Microsoft.Kiota.Serialization.Multipart; + +namespace Uno.Extensions.Http.Kiota; + +/// +/// Provides extension methods for registering Kiota clients within the . +/// +public static class ServiceCollectionExtensions +{ + /// + /// Registers a Kiota client with the specified and endpoint options. + /// + /// The Kiota client type to register. + /// The to register the client with. + /// The providing the hosting context. + /// [Optional] The endpoint options for the client (loaded from appsettings if not specified). + /// [Optional] The name for locating endpoint information in appsettings. + /// [Optional] A callback for configuring the endpoint. + /// The updated with the registered Kiota client. + public static IServiceCollection AddKiotaClientV2(this IServiceCollection services, + HostBuilderContext context, + EndpointOptions? options = null, string? name = null, + Func? configure = null) + where TClient : class => + services.AddKiotaClientWithEndpointV2(context, options, name, configure); + + /// + /// Registers a Kiota client with the specified and supports additional endpoint options. + /// + /// The Kiota client type to register. + /// The type of endpoint to register. + /// The to register the client with. + /// The providing the hosting context. + /// [Optional] The endpoint options for the client (loaded from appsettings if not specified). + /// [Optional] The name for locating endpoint information in appsettings. + /// [Optional] A callback for configuring the endpoint. + /// The updated with the registered Kiota client. + public static IServiceCollection AddKiotaClientWithEndpointV2( + this IServiceCollection services, HostBuilderContext context, TEndpoint? options = null, string? name = null, + Func? configure = null) + where TClient : class where TEndpoint : EndpointOptions, new() + { + services.AddKiotaHandlers(); + string clientName = name ?? typeof(TClient).FullName ?? "DefaultClient"; + + return services.AddClientWithEndpoint(context, + options, + clientName, + (s, c) => s.AddHttpClient(clientName) + .AddTypedClient((httpClient, sp) => + { + var authProvider = + new + AnonymousAuthenticationProvider(); + + var parseNodeFactory = + new JsonParseNodeFactory(); + + var serializationWriterFactory = + new + CompositeSerializationWriterFactory(); + + serializationWriterFactory + .AddFactory(new + JsonSerializationWriterFactory()); + + serializationWriterFactory + .AddFactory(new + MultipartSerializationWriterFactory()); + + var requestAdapter = + new + HttpClientRequestAdapter(authProvider, + parseNodeFactory, + serializationWriterFactory, + httpClient); + + return (TClient) + Activator + .CreateInstance(typeof( + TClient), + requestAdapter)!; + }) + .AttachKiotaHandlers(), + configure); + } + + /// + /// Dynamically adds Kiota handlers to the service collection. + /// + /// The to register the handlers with. + /// The updated with the registered Kiota handlers. + private static IServiceCollection AddKiotaHandlers(this IServiceCollection services) + { + IList kiotaHandlers = KiotaClientFactory.GetDefaultHandlerTypes(); + foreach(Type handler in kiotaHandlers) services.AddTransient(handler); + + return services; + } + + /// + /// Attaches Kiota handlers to the . + /// + /// The to attach the handlers to. + /// The updated with the attached Kiota handlers. + private static IHttpClientBuilder AttachKiotaHandlers(this IHttpClientBuilder builder) + { + IList kiotaHandlers = KiotaClientFactory.GetDefaultHandlerTypes(); + + foreach(Type handler in kiotaHandlers) + builder.AddHttpMessageHandler(sp => (DelegatingHandler)sp.GetRequiredService(handler)); + + return builder; + } +} \ No newline at end of file